diff -r 28392c9a969f -r 0b1c315ffc64 Source/TicTacToeGame.m --- a/Source/TicTacToeGame.m Mon Jul 14 21:00:15 2008 -0700 +++ b/Source/TicTacToeGame.m Sun Feb 06 16:31:03 2011 -0800 @@ -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;