Skip to content

Instantly share code, notes, and snippets.

@justinwyer
Created February 10, 2013 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinwyer/4750464 to your computer and use it in GitHub Desktop.
Save justinwyer/4750464 to your computer and use it in GitHub Desktop.
Implementation for TDD
@implementation Card {
}
- (int)match:(NSArray *)cards {
int score = 0;
for (Card *card in cards) {
if ([card.contents isEqualToString:self.contents]) {
score = 1;
break;
}
}
return score;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment