Changeset 7f884ea in network-game for common/WorldMap.h


Ignore:
Timestamp:
Jan 24, 2014, 12:27:15 AM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
f66d04f
Parents:
e70b66b
Message:

Map-related structs are now outside of the WorldMap class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/WorldMap.h

    re70b66b r7f884ea  
    99using namespace std;
    1010
     11enum TerrainType {
     12   TERRAIN_NONE,
     13   TERRAIN_GRASS,
     14   TERRAIN_OCEAN,
     15   TERRAIN_ROCK
     16};
     17
     18enum StructureType {
     19   STRUCTURE_NONE,
     20   STRUCTURE_BLUE_FLAG,
     21   STRUCTURE_RED_FLAG
     22};
     23
     24enum ObjectType {
     25   OBJECT_NONE,
     26   OBJECT_BLUE_FLAG,
     27   OBJECT_RED_FLAG
     28};
     29
    1130class WorldMap {
    1231public:
    13    enum TerrainType {
    14       TERRAIN_NONE,
    15       TERRAIN_GRASS,
    16       TERRAIN_OCEAN,
    17       TERRAIN_ROCK
    18    };
    19 
    20    enum StructureType {
    21       STRUCTURE_NONE,
    22       STRUCTURE_BLUE_FLAG,
    23       STRUCTURE_RED_FLAG
    24    };
    25 
    26    enum ObjectType {
    27       OBJECT_NONE,
    28       OBJECT_BLUE_FLAG,
    29       OBJECT_RED_FLAG
    30    };
    31 
    3232   class Object {
    3333   public:
     
    6767
    6868   void addObject(ObjectType type, int x, int y);
    69    void updateObject(unsigned int id, WorldMap::ObjectType t, int x, int y);
     69   void updateObject(unsigned int id, ObjectType t, int x, int y);
    7070   bool removeObject(unsigned int id);
    7171
Note: See TracChangeset for help on using the changeset viewer.