diff options
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/src/map.h b/src/map.h deleted file mode 100644 index 6fe1e62..0000000 --- a/src/map.h +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | #ifndef MAP_H_74055FC0 | ||
2 | #define MAP_H_74055FC0 | ||
3 | |||
4 | #include <vector> | ||
5 | #include <string> | ||
6 | #include <list> | ||
7 | #include <stdexcept> | ||
8 | #include <map> | ||
9 | |||
10 | class Map { | ||
11 | public: | ||
12 | |||
13 | class Adjacent { | ||
14 | public: | ||
15 | |||
16 | enum class Type { | ||
17 | wall, | ||
18 | wrap, | ||
19 | warp, | ||
20 | reverse | ||
21 | }; | ||
22 | |||
23 | Adjacent( | ||
24 | Type type = Type::wall, | ||
25 | int mapId = -1) : | ||
26 | type_(type), | ||
27 | mapId_(mapId) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | inline Type getType() const | ||
32 | { | ||
33 | return type_; | ||
34 | } | ||
35 | |||
36 | inline int getMapId() const | ||
37 | { | ||
38 | return mapId_; | ||
39 | } | ||
40 | |||
41 | private: | ||
42 | |||
43 | Type type_; | ||
44 | int mapId_; | ||
45 | }; | ||
46 | |||
47 | Map( | ||
48 | int id, | ||
49 | std::vector<int> tiles, | ||
50 | std::string title, | ||
51 | Adjacent leftAdjacent, | ||
52 | Adjacent rightAdjacent, | ||
53 | Adjacent upAdjacent, | ||
54 | Adjacent downAdjacent) : | ||
55 | id_(id), | ||
56 | tiles_(std::move(tiles)), | ||
57 | title_(std::move(title)), | ||
58 | leftAdjacent_(std::move(leftAdjacent)), | ||
59 | rightAdjacent_(std::move(rightAdjacent)), | ||
60 | upAdjacent_(std::move(upAdjacent)), | ||
61 | downAdjacent_(std::move(downAdjacent)) | ||
62 | { | ||
63 | } | ||
64 | |||
65 | inline size_t getId() const | ||
66 | { | ||
67 | return id_; | ||
68 | } | ||
69 | |||
70 | inline const std::vector<int>& getTiles() const | ||
71 | { | ||
72 | return tiles_; | ||
73 | } | ||
74 | |||
75 | inline const std::string& getTitle() const | ||
76 | { | ||
77 | return title_; | ||
78 | } | ||
79 | |||
80 | inline const Adjacent& getLeftAdjacent() const | ||
81 | { | ||
82 | return leftAdjacent_; | ||
83 | } | ||
84 | |||
85 | inline const Adjacent& getRightAdjacent() const | ||
86 | { | ||
87 | return rightAdjacent_; | ||
88 | } | ||
89 | |||
90 | inline const Adjacent& getUpAdjacent() const | ||
91 | { | ||
92 | return upAdjacent_; | ||
93 | } | ||
94 | |||
95 | inline const Adjacent& getDownAdjacent() const | ||
96 | { | ||
97 | return downAdjacent_; | ||
98 | } | ||
99 | |||
100 | private: | ||
101 | |||
102 | int id_; | ||
103 | std::vector<int> tiles_; | ||
104 | std::string title_; | ||
105 | Adjacent leftAdjacent_; | ||
106 | Adjacent rightAdjacent_; | ||
107 | Adjacent upAdjacent_; | ||
108 | Adjacent downAdjacent_; | ||
109 | }; | ||
110 | |||
111 | #endif /* end of include guard: MAP_H_74055FC0 */ | ||