diff -r 3eb7be1dd7b6 -r 428a194e3e59 Source/DemoBoardView.m --- a/Source/DemoBoardView.m Mon Mar 10 17:30:57 2008 -0700 +++ b/Source/DemoBoardView.m Sun Mar 16 15:06:47 2008 -0700 @@ -43,7 +43,7 @@ @"TicTacToeGame", @"GoGame"}; /** Class name of the current game. */ -static NSString* sCurrentGameName = @"KlondikeGame"; +static NSString* sCurrentGameName = @"CheckersGame"; - (void) startGameNamed: (NSString*)gameClassName @@ -89,6 +89,8 @@ alignment: kCALayerWidthSizable | kCALayerMinYMargin]; [self startGameNamed: sCurrentGameName]; + + [_turnSlider bind: @"value" toObject: self withKeyPath: @"game.currentTurn" options: nil]; } @@ -106,6 +108,10 @@ { Game *game = self.game; if( object == game ) { + NSLog(@"maxTurn = %u, currentTurn=%u", self.game.maxTurn,self.game.currentTurn); + _turnSlider.maxValue = self.game.maxTurn; + _turnSlider.numberOfTickMarks = self.game.maxTurn+1; + Player *p = game.winner; NSString *msg; if( p ) { @@ -114,6 +120,7 @@ } else { p = game.currentPlayer; msg = @"Your turn, %@"; + NSLog(@"Game state = '%@'", self.game.stateString); } _headline.string = [NSString stringWithFormat: msg, p.name]; }