diff options
| author | Mike Buland <mike@xagasoft.com> | 2015-04-02 15:28:31 -0600 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2015-04-02 15:28:31 -0600 |
| commit | 518619603ab3c49b7fdfcf19c439c1a30668164f (patch) | |
| tree | dda7774f51bde150db91dac14718cc78f7571039 /src/map.h | |
| download | lost-518619603ab3c49b7fdfcf19c439c1a30668164f.tar.gz lost-518619603ab3c49b7fdfcf19c439c1a30668164f.tar.bz2 lost-518619603ab3c49b7fdfcf19c439c1a30668164f.tar.xz lost-518619603ab3c49b7fdfcf19c439c1a30668164f.zip | |
Everything works, it could use more stuff.
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 | ||
