diff -r 436cbdf56810 -r 7c9ecb09a612 Source/DemoBoardView.m --- a/Source/DemoBoardView.m Sat Jul 05 17:46:43 2008 -0700 +++ b/Source/DemoBoardView.m Fri Jul 18 13:26:59 2008 -0700 @@ -22,6 +22,8 @@ */ #import "DemoBoardView.h" #import "Game.h" +#import "Turn.h" +#import "Player.h" #import "GGBTextLayer.h" #import "QuartzUtils.h" @@ -39,7 +41,7 @@ - (IBAction) toggleRemoteOpponent: (id)sender { - NSAssert(self.game.currentTurn==0,@"Game has already begun"); + NSAssert(self.game.currentTurnNo==0,@"Game has already begun"); Player *opponent = [self.game.players objectAtIndex: 1]; opponent.local = !opponent.local; } @@ -94,7 +96,7 @@ [self startGameNamed: sCurrentGameName]; - [_turnSlider bind: @"value" toObject: self withKeyPath: @"game.currentTurn" options: nil]; + [_turnSlider bind: @"value" toObject: self withKeyPath: @"game.currentTurnNo" options: nil]; } @@ -112,12 +114,12 @@ { Game *game = self.game; if( object == game ) { - NSLog(@"maxTurn = %u, currentTurn = %u", - self.game.maxTurn,self.game.currentTurn); - NSLog(@"Game state = '%@'", self.game.stateString); + NSLog(@"maxTurnNo = %u, currentTurnNo = %u", + self.game.maxTurnNo,self.game.currentTurnNo); + NSLog(@"Game state = '%@'", self.game.currentTurn.boardState); - _turnSlider.maxValue = self.game.maxTurn; - _turnSlider.numberOfTickMarks = self.game.maxTurn+1; + _turnSlider.maxValue = self.game.maxTurnNo; + _turnSlider.numberOfTickMarks = self.game.maxTurnNo+1; Player *p = game.winner; NSString *msg; @@ -141,7 +143,7 @@ - (IBAction) undo: (id)sender { if( self.game.currentTurn > 0 ) - self.game.currentTurn--; + self.game.currentTurnNo--; else NSBeep(); } @@ -149,8 +151,8 @@ - (IBAction) redo: (id)sender { - if( self.game.currentTurn < self.game.maxTurn ) - self.game.currentTurn++; + if( self.game.currentTurnNo < self.game.maxTurnNo ) + self.game.currentTurnNo++; else NSBeep(); }