diff -r 428a194e3e59 -r 45c82a071aca Source/DemoBoardView.m --- a/Source/DemoBoardView.m Sun Mar 16 15:06:47 2008 -0700 +++ b/Source/DemoBoardView.m Wed May 28 12:47:10 2008 -0700 @@ -72,6 +72,10 @@ } +- (BOOL)canBecomeKeyView {return YES;} +- (BOOL)acceptsFirstResponder {return YES;} + + - (void) awakeFromNib { srandomdev(); @@ -94,7 +98,7 @@ } -- (void) startGameFromMenu: (id)sender +- (IBAction) startGameFromMenu: (id)sender { sCurrentGameName = kMenuGameNames[ [sender tag] ]; [self startGameNamed: sCurrentGameName]; @@ -127,6 +131,24 @@ } +- (IBAction) undo: (id)sender +{ + if( self.game.currentTurn > 0 ) + self.game.currentTurn--; + else + NSBeep(); +} + + +- (IBAction) redo: (id)sender +{ + if( self.game.currentTurn < self.game.maxTurn ) + self.game.currentTurn++; + else + NSBeep(); +} + + - (IBAction) enterFullScreen: (id)sender { [super enterFullScreen: sender];