source: network-game/common/WorldMap.h@ 60017fc

Last change on this file since 60017fc was 62ee2ce, checked in by dportnoy <dmp1488@…>, 12 years ago

The client shows the map and converts between screen and map coordinates

  • Property mode set to 100644
File size: 479 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};
29
30#endif
Note: See TracBrowser for help on using the repository browser.