diff -r 28392c9a969f -r b0affce7beb1 Source/TicTacToeGame.m --- a/Source/TicTacToeGame.m Mon Jul 14 21:00:15 2008 -0700 +++ b/Source/TicTacToeGame.m Tue Mar 10 22:36:23 2009 -0700 @@ -58,23 +58,6 @@ _grid.cellColor = CreateGray(1.0, 0.25); _grid.lineColor = kTranslucentLightGrayColor; [_table addSublayer: _grid]; - - // Create piece dispensers for the two players: - for( int playerNumber=0; playerNumber<=1; playerNumber++ ) { - Piece *p = [self pieceForPlayer: playerNumber]; - CGFloat x = floor(CGRectGetMidX(_table.bounds)); -#if TARGET_OS_IPHONE - x = x - 80 + 160*playerNumber; - CGFloat y = 360; -#else - x += (playerNumber==0 ?-230 :230); - CGFloat y = 175; -#endif - [_dispenser[playerNumber] release]; - _dispenser[playerNumber] = [[Dispenser alloc] initWithPrototype: p quantity: 0 - frame: CGRectMake(x-45,y-45, 90,90)]; - [_table addSublayer: _dispenser[playerNumber]]; - } } @@ -109,7 +92,7 @@ - (Bit*) bitToPlaceInHolder: (id)holder { if( holder.bit==nil && [holder isKindOfClass: [Square class]] ) - return _dispenser[self.currentPlayer.index].bit; + return [self pieceForPlayer: self.currentPlayer.index]; else return nil; } @@ -123,15 +106,6 @@ [super bit: bit movedFrom: src to: dst]; } -/* FIX: Need to restore this somehow, now that -nextPlayer is gone -- (void) nextPlayer -{ - [super nextPlayer]; - // Give the next player another piece to put down: - _dispenser[self.currentPlayer.index].quantity = 1; -} - */ - static Player* ownerAt( Grid *grid, int index ) { return [grid cellAtRow: index/3 column: index%3].bit.owner;