Last active
August 29, 2015 14:07
-
-
Save HeidiHansen/f4b1f4acb8ba04cc1561 to your computer and use it in GitHub Desktop.
Playing Card Deck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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