00001
00002
00003
00004
00005
00006
00007
00008
00009 @class Team;
00010
00011 #import <Cocoa/Cocoa.h>
00012 #import "Entity.h"
00013 #import "Team.h"
00014
00015
00016 #define PLANET_REPAIR 0x010
00017 #define PLANET_FUEL 0x020
00018 #define PLANET_AGRI 0x040
00019 #define PLANET_REDRAW 0x080 // should the planet be redrawn on the galactic?
00020 #define PLANET_HOME 0x100 // home planet for a given team
00021 #define PLANET_COUP 0x200 // Coup has occured
00022 #define PLANET_CHEAP 0x400 // Planet was taken from undefended team
00023
00024 #define PLANET_MAX_NR_OF_PLANETS 40
00025
00026 @interface Planet : Entity {
00027 int flags;
00028 Team *owner;
00029 NSString *name;
00030 int armies;
00031 int planetId;
00032 int info;
00033 int orbit;
00034 bool needsDisplay;
00035 }
00036
00037 - (id)initWithPlanetId:(int)id;
00038 - (int)planetId;
00039 - (int) info;
00040 - (int) flags;
00041 - (int) armies;
00042 - (Team *) owner;
00043 - (NSString*) name;
00044 - (NSString*) nameWithArmiesIndicator;
00045 - (NSString*) abbreviation;
00046 - (bool) needsDisplay;
00047 - (NSSize) size;
00048
00049 - (void) setInfo: (int) newInfo;
00050 - (void) setFlags: (int) newFlags;
00051 - (void) setArmies: (int) newArmies;
00052 - (void) setOwner: (Team*) team;
00053 - (void) setName:(NSString *)newName;
00054 - (void) setNeedsDisplay: (bool) redraw;
00055
00056 @end