From 0ebbf53839351a03f1baf8cf5a1ed62b2b50b7d8 Mon Sep 17 00:00:00 2001 From: exterlulz Date: Sun, 22 Aug 2010 09:35:26 +0200 Subject: [PATCH] rename Game.score property --- src/Game.h | 4 ++-- src/Game.m | 4 ++-- src/GameController.m | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Game.h b/src/Game.h index 3171d1b..9d686fd 100644 --- a/src/Game.h +++ b/src/Game.h @@ -38,8 +38,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. BOOL muted; } -@property (readonly) int _score; -@property (readonly) int _bonusMultiplier; +@property (readonly) int score; +@property (readonly) int bonusMultiplier; @property (readonly) NSPoint hintPoint; diff --git a/src/Game.m b/src/Game.m index c7d3ee9..c4e3aa7 100644 --- a/src/Game.m +++ b/src/Game.m @@ -27,8 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @implementation Game -@synthesize _score; -@synthesize _bonusMultiplier; +@synthesize score = _score; +@synthesize bonusMultiplier = _bonusMultiplier; @dynamic hintPoint; diff --git a/src/GameController.m b/src/GameController.m index a82da53..00748c0 100644 --- a/src/GameController.m +++ b/src/GameController.m @@ -289,9 +289,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. gameScores = [hiScores objectAtIndex:gameLevel*2+1]; [game wholeNewGameWithSpritesFrom:[gameView spriteArray]]; - [scoreTextField setStringValue:[NSString stringWithFormat:@"%d", game._score]]; + [scoreTextField setStringValue:[NSString stringWithFormat:@"%d", game.score]]; [scoreTextField setNeedsDisplay:YES]; - [bonusTextField setStringValue:[NSString stringWithFormat:@"x%d", game._bonusMultiplier]]; + [bonusTextField setStringValue:[NSString stringWithFormat:@"x%d", game.bonusMultiplier]]; [bonusTextField setNeedsDisplay:YES]; [game setMuted:muted]; @@ -546,10 +546,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. gameScores = [hiScores objectAtIndex:gameLevel*2+1]; for (i = 0; i < 10; i++) { - if (game._score > [[gameScores objectAtIndex:i] intValue]) + if (game.score > [[gameScores objectAtIndex:i] intValue]) { [hiScorePanelScoreTextField - setStringValue:[NSString stringWithFormat:@"%d", game._score]]; + setStringValue:[NSString stringWithFormat:@"%d", game.score]]; [NSApp beginSheet:hiScorePanel modalForWindow:gameWindow modalDelegate:self @@ -771,14 +771,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - (void)testForThrees { BOOL anyThrees; - int oldScore = game._score; + int oldScore = game.score; //NSLog(@"testForThrees"); anyThrees = ([game testForThreeAt:chx1:chy1])|([game testForThreeAt:chx2:chy2]); - [scoreTextField setStringValue:[NSString stringWithFormat:@"%d", game._score]]; + [scoreTextField setStringValue:[NSString stringWithFormat:@"%d", game.score]]; [scoreTextField setNeedsDisplay:YES]; - [bonusTextField setStringValue:[NSString stringWithFormat:@"x%d", game._bonusMultiplier]]; + [bonusTextField setStringValue:[NSString stringWithFormat:@"x%d", game.bonusMultiplier]]; [bonusTextField setNeedsDisplay:YES]; - if (game._score > oldScore) [timerView incrementMeter:[game collectFadedGems]/GEMS_FOR_BONUS]; + if (game.score > oldScore) [timerView incrementMeter:[game collectFadedGems]/GEMS_FOR_BONUS]; if (anyThrees) [self startAnimation:@selector(removeThreesAndReplaceGems)]; // fade gems else @@ -798,16 +798,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - (void)testForThreesAgain { - int oldScore = game._score; + int oldScore = game.score; BOOL anyThrees = [game checkBoardForThrees]; - [scoreTextField setStringValue:[NSString stringWithFormat:@"%d", game._score]]; + [scoreTextField setStringValue:[NSString stringWithFormat:@"%d", game.score]]; [scoreTextField setNeedsDisplay:YES]; - [bonusTextField setStringValue:[NSString stringWithFormat:@"x%d", game._bonusMultiplier]]; + [bonusTextField setStringValue:[NSString stringWithFormat:@"x%d", game.bonusMultiplier]]; [bonusTextField setNeedsDisplay:YES]; - if (game._score > oldScore) { + if (game.score > oldScore) { [timerView incrementMeter:[game collectFadedGems]/GEMS_FOR_BONUS]; } if (anyThrees) { -- 2.11.4.GIT