source:
network-game/common/WorldMap.h@
60017fc
Last change on this file since 60017fc was 62ee2ce, checked in by , 12 years ago | |
---|---|
|
|
File size: 479 bytes |
Rev | Line | |
---|---|---|
[62ee2ce] | 1 | #ifndef _WORLDMAP_H |
2 | #define _WORLDMAP_H | |
[60b77d2] | 3 | |
4 | #include <vector> | |
5 | ||
6 | using namespace std; | |
7 | ||
[62ee2ce] | 8 | class WorldMap { |
[60b77d2] | 9 | public: |
10 | enum TerrainType { | |
11 | TERRAIN_NONE, | |
12 | TERRAIN_GRASS, | |
[62ee2ce] | 13 | TERRAIN_OCEAN, |
14 | TERRAIN_ROCK | |
[60b77d2] | 15 | }; |
16 | ||
17 | int width, height; | |
18 | vector<vector<TerrainType>*>* vctMap; | |
19 | ||
[62ee2ce] | 20 | WorldMap(int width, int height); |
[60b77d2] | 21 | |
[62ee2ce] | 22 | ~WorldMap(); |
[60b77d2] | 23 | |
[62ee2ce] | 24 | TerrainType getElement(int x, int y); |
[60b77d2] | 25 | void setElement(int x, int y, TerrainType type); |
26 | ||
[62ee2ce] | 27 | static WorldMap* createDefaultMap(); |
[60b77d2] | 28 | }; |
29 | ||
[62ee2ce] | 30 | #endif |
Note:
See TracBrowser
for help on using the repository browser.