Source/KlondikeGame.m
changeset 22 4cb50131788f
parent 13 db7bb080c3d5
child 26 e7a464fb6d39
     1.1 --- a/Source/KlondikeGame.m	Tue Jul 08 13:12:01 2008 -0700
     1.2 +++ b/Source/KlondikeGame.m	Thu Jul 31 11:18:13 2008 -0700
     1.3 @@ -50,7 +50,7 @@
     1.4          
     1.5  - (void) setUpBoard
     1.6  {
     1.7 -    CGSize boardSize = _board.bounds.size;
     1.8 +    CGSize boardSize = _table.bounds.size;
     1.9      CGFloat xSpacing = floor(boardSize.width/7);
    1.10      CGSize kCardSize;
    1.11      kCardSize.width  = round(xSpacing * 0.9);  // 1/7th of width, with 10% gap
    1.12 @@ -62,19 +62,19 @@
    1.13      _deck = [[[Deck alloc] initWithCardsOfClass: [PlayingCard class]] autorelease];
    1.14      [_deck shuffle];
    1.15      _deck.position = pos;
    1.16 -    [_board addSublayer: _deck];
    1.17 +    [_table addSublayer: _deck];
    1.18      
    1.19      pos.x += xSpacing;
    1.20      _sink = [[[Deck alloc] init] autorelease];
    1.21      _sink.position = pos;
    1.22 -    [_board addSublayer: _sink];
    1.23 +    [_table addSublayer: _sink];
    1.24      
    1.25      pos.x += xSpacing;
    1.26      for( CardSuit suit=kSuitClubs; suit<=kSuitSpades; suit++ ) {
    1.27          pos.x += xSpacing;
    1.28          Deck *aces = [[[Deck alloc] init] autorelease];
    1.29          aces.position = pos;
    1.30 -        [_board addSublayer: aces];
    1.31 +        [_table addSublayer: aces];
    1.32          _aces[suit] = aces;
    1.33      }
    1.34      
    1.35 @@ -88,7 +88,7 @@
    1.36          stackFrame.origin.x += xSpacing;
    1.37          stack.backgroundColor = nil; //kAlmostInvisibleWhiteColor;
    1.38          stack.dragAsStacks = YES;
    1.39 -        [_board addSublayer: stack];
    1.40 +        [_table addSublayer: stack];
    1.41          
    1.42          // According to the rules, one card should be added to each stack in turn, instead
    1.43          // of populating entire stacks one at a time. However, if one trusts the Deck's