Guest

Untitled

By: a guest on Jan 28th, 2012  |  syntax: None  |  size: 0.32 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1.  
  2. #import "Deck.h"
  3. #import "Hand.h"
  4.  
  5.  
  6. @implementation Deck
  7.  
  8. - (id) init
  9. {
  10.         return [self initFromArray:[NSArray array]];
  11. }
  12.  
  13. // designated initializer
  14. - (id)initFromArray:(NSArray*)cards
  15. {
  16.         self = [super init];
  17.         if (self != nil) {
  18.                 _cards = [[NSMutableArray alloc] initWithArray:cards];
  19.         }
  20.         return self;   
  21. }