source: network-game/common/WorldMap.h@ 384b7e0

Last change on this file since 384b7e0 was 384b7e0, checked in by dportnoy <dmp1488@…>, 12 years ago

The client displays a small map upon login and lets the user move around

  • Property mode set to 100644
File size: 533 bytes
Line 
1#ifndef _WORLDMAP_H
2#define _WORLDMAP_H
3
4#include <vector>
5
6using namespace std;
7
8class WorldMap {
9public:
10 enum TerrainType {
11 TERRAIN_NONE,
12 TERRAIN_GRASS,
13 TERRAIN_OCEAN,
14 TERRAIN_ROCK
15 };
16
17 int width, height;
18 vector<vector<TerrainType>*>* vctMap;
19
20 WorldMap(int width, int height);
21
22 ~WorldMap();
23
24 TerrainType getElement(int x, int y);
25 void setElement(int x, int y, TerrainType type);
26
27 static WorldMap* createDefaultMap();
28 static WorldMap* loadMapFromFile(string filename);
29};
30
31#endif
Note: See TracBrowser for help on using the repository browser.