Added ball graphics to Xcode project, which fixes the Go game. Fixed Tic-Tac-Toe. Fixed an exception in the demo app when changing games.
5 // Created by Jens Alfke on 7/3/08.
6 // Copyright 2008 Jens Alfke. All rights reserved.
9 #import <Foundation/Foundation.h>
14 kTurnEmpty, // No action yet
15 kTurnPartial, // Action taken, but more needs to be done
16 kTurnComplete, // Action complete, but player needs to confirm
17 kTurnFinished // Turn is confirmed and finished
21 extern NSString* const kTurnCompleteNotification;
24 /** A record of a particular turn in a Game, including the player's move and the resulting state. */
25 @interface Turn : NSObject <NSCoding>
31 NSString *_boardState;
37 - (id) initWithPlayer: (Player*)player;
38 - (id) initStartOfGame: (Game*)game;
40 @property (readonly) Game *game;
41 @property (readonly) Player *player, *nextPlayer;
42 @property (readonly) Turn *previousTurn, *nextTurn;
43 @property (readonly) unsigned turnNumber;
44 @property (readonly) BOOL isLatestTurn;
46 @property TurnStatus status;
48 @property (readonly,copy) NSString *move; // The player's move (nil for turn 0)
49 @property (readonly,copy) NSString *boardState; // State of the game AFTER the move
50 @property (readonly,retain)NSDate *date;
51 @property (copy) NSString *comment;
53 /** Appends to the move string. Only allowed if the status is Empty or Partial. */
54 - (void) addToMove: (NSString*)move;
56 /** Copies the current state of the Game's board to my boardState */
57 - (void) captureBoardState;
59 @property BOOL replaying;
63 /** Changes a Turn's status from finished back to complete. For use only by -[Game unfinishLastTurn] */