Skip to content

Instantly share code, notes, and snippets.

@HeidiHansen
Last active August 29, 2015 14:07
Show Gist options
  • Save HeidiHansen/f4b1f4acb8ba04cc1561 to your computer and use it in GitHub Desktop.
Save HeidiHansen/f4b1f4acb8ba04cc1561 to your computer and use it in GitHub Desktop.
Playing Card Deck
- (instancetype)init
{
self = [super init];
self.cards = [[NSMutableArray alloc] init];
NSArray *suits = @[@"♣",@"♥",@"♦",@"♠"];
for (NSInteger i=0; i<4; i++){
for (NSInteger j=0; j<13; j++){
FISPlayingCard *card = [[FISPlayingCard alloc]initWithSuit:suits[i] rank:@(j)];
[self.cards addObject:card];
}
}
return self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment