/[hegemonie]/hegemonie/GameEngine/HgGame.m
ViewVC logotype

Diff of /hegemonie/GameEngine/HgGame.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by thunder, Wed Jul 2 15:45:25 2003 UTC revision 1.7 by thunder, Mon Jul 7 16:36:52 2003 UTC
# Line 59  Line 59 
59  }  }
60    
61  /**  /**
62     * Initialize a new game, with an existing game.
63     */
64    - (id) initWithGame: (HgGame *)game
65    {
66      NSParameterAssert(game);
67    
68      self = [super init];
69      if (self != nil)
70        {
71          _name = RETAIN([game name]);
72          _players = [[NSMutableArray alloc] initWithArray: [game players]];
73          _teams = [[NSMutableArray alloc] initWithArray: [game teams]];
74          _map = nil;
75          _objects = [[NSMutableArray alloc] initWithArray: [game objects]];
76        }
77      
78      return self;
79    }
80    
81    /**
82   * Dealloc the current game.   * Dealloc the current game.
83   */   */
84  - (void) dealloc  - (void) dealloc
# Line 198  Line 218 
218    return _objects;    return _objects;
219  }  }
220    
221    /**
222     *
223     */
224    - (void) modifWithGame: (HgGame *)game
225    {
226      NSParameterAssert (game);
227    
228      [_name setString: [game name]];
229      [_players setArray: [game players]];
230      [_teams setArray: [game teams]];
231      _map = [game map];
232      [_objects setArray: [game objects]];
233    }
234    
235  @end  @end
236    
237    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26