Please note, this blog entry is from a previous course. You might want to check out the current one.
Make this a two player game. There’s no need to go overboard here. Think of a simple UI and a straightforward implementation that make sense.
Create a new property to hold the separate scores of the players and another one to know the current player:
@property (strong, nonatomic) NSMutableArray *playerScores; // of NSNumber @property (nonatomic) int currentPlayer; ... - (NSMutableArray *)playerScores { if (!_playerScores) { _playerScores = [NSMutableArray arrayWithObjects:@0, @0, nil]; } return _playerScores; }
Continue reading “cs193p – Assignment #3 Extra Task #6”