Skip to content

Instantly share code, notes, and snippets.

@gbasile
Created April 30, 2013 08:29
Show Gist options
  • Save gbasile/5487386 to your computer and use it in GitHub Desktop.
Save gbasile/5487386 to your computer and use it in GitHub Desktop.
Return Code
- (NSString *)score
{
if (self.firstPlayerScore == 3 && self.secondPlayerScore == 3 )
return @"DEUCE";
if (self.firstPlayerScore == 4)
return @"GAME PLAYER 1";
if (self.secondPlayerScore == 4)
return @"GAME PLAYER 2";
return [NSString stringWithFormat:@"%@ - %@", [self basicScore:self.firstPlayerScore], [self basicScore:self.secondPlayerScore]]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment