diff options
Diffstat (limited to '')
-rw-r--r-- | src/map.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h new file mode 100644 index 0000000..eda5fd8 --- /dev/null +++ b/src/map.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef MAP_H | ||
2 | #define MAP_H | ||
3 | |||
4 | class Position; | ||
5 | class Cell; | ||
6 | |||
7 | class Map | ||
8 | { | ||
9 | public: | ||
10 | Map( const Position &rpMax ); | ||
11 | virtual ~Map(); | ||
12 | |||
13 | Cell &operator[]( const Position &rpIdx ) const; | ||
14 | Cell &operator[]( const Position &rpIdx ); | ||
15 | |||
16 | int getDims() const; | ||
17 | int getSize( int iDim ) const; | ||
18 | int getIndex( const Position &rpIdx ) const; | ||
19 | bool isInside( const Position &rpIdx ) const; | ||
20 | void connect( int iId1, int iId2 ); | ||
21 | |||
22 | private: | ||
23 | int iDims; | ||
24 | int *aiSize; | ||
25 | Cell *acMap; | ||
26 | }; | ||
27 | |||
28 | #endif | ||