* Put the spots in the right place in 13x13 and 19x19 boards.
* Fixed some front/back layering issues in Grid.
5 // Created by Jens Alfke on 7/3/08.
6 // Copyright 2008 Jens Alfke. All rights reserved.
9 #import <Foundation/Foundation.h>
13 /** A mostly-passive object used to represent a player. */
14 @interface Player : NSObject <NSCoding>
19 NSMutableDictionary *_extraValues;
22 - (id) initWithGame: (Game*)game;
23 - (id) initWithName: (NSString*)name;
25 - (id) initWithCoder: (NSCoder*)decoder;
26 - (void) encodeWithCoder: (NSCoder*)coder;
28 @property (copy) NSString *name; // Display name
29 @property (readonly) CGImageRef icon; // An icon to display (calls game.iconForPlayer:)
31 @property (readonly) Game *game;
32 @property (readonly) int index; // Player's index in the Game's -players array
33 @property (readwrite,getter=isLocal) BOOL local; // Is player a human at this computer? (Defaults to YES)
34 @property (readonly, getter=isCurrent) BOOL current; // Is it this player's turn?
35 @property (readonly, getter=isFriendly) BOOL friendly; // Is this player the current player or an ally?
36 @property (readonly, getter=isUnfriendly) BOOL unfriendly; // Is this player an opponent of the current player?
37 @property (readonly) Player *nextPlayer, *previousPlayer; // The next/previous player in sequence
39 /** Copy all of the player's attributes (name, local...) into myself. */
40 - (void) copyFrom: (Player*)player;
45 @interface CALayer (Game)
47 /** Called on any CALayer in the game's layer tree, will return the current Game object. */
48 @property (readonly) Game *game;