1.1 --- a/Source/TicTacToeGame.m Thu Jul 03 17:44:30 2008 -0700
1.2 +++ b/Source/TicTacToeGame.m Thu Jul 31 13:23:44 2008 -0700
1.3 @@ -50,19 +50,19 @@
1.4 - (void) setUpBoard
1.5 {
1.6 // Create a 3x3 grid:
1.7 - CGFloat center = floor(CGRectGetMidX(_board.bounds));
1.8 + CGFloat center = floor(CGRectGetMidX(_table.bounds));
1.9 [_grid release];
1.10 _grid = [[RectGrid alloc] initWithRows: 3 columns: 3 frame: CGRectMake(center-150,0, 300,300)];
1.11 [_grid addAllCells];
1.12 _grid.allowsMoves = _grid.allowsCaptures = NO;
1.13 _grid.cellColor = CreateGray(1.0, 0.25);
1.14 _grid.lineColor = kTranslucentLightGrayColor;
1.15 - [_board addSublayer: _grid];
1.16 + [_table addSublayer: _grid];
1.17
1.18 // Create piece dispensers for the two players:
1.19 for( int playerNumber=0; playerNumber<=1; playerNumber++ ) {
1.20 Piece *p = [self pieceForPlayer: playerNumber];
1.21 - CGFloat x = floor(CGRectGetMidX(_board.bounds));
1.22 + CGFloat x = floor(CGRectGetMidX(_table.bounds));
1.23 #if TARGET_OS_IPHONE
1.24 x = x - 80 + 160*playerNumber;
1.25 CGFloat y = 360;
1.26 @@ -73,7 +73,7 @@
1.27 [_dispenser[playerNumber] release];
1.28 _dispenser[playerNumber] = [[Dispenser alloc] initWithPrototype: p quantity: 0
1.29 frame: CGRectMake(x-45,y-45, 90,90)];
1.30 - [_board addSublayer: _dispenser[playerNumber]];
1.31 + [_table addSublayer: _dispenser[playerNumber]];
1.32 }
1.33 }
1.34