-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSmallGameMap.hpp
143 lines (119 loc) · 5.14 KB
/
SmallGameMap.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// Copyright 2016 Anton Erholt <aerholt@kth.se>
#ifndef LAB3_SMALL_GAME_MAP_HPP_
#define LAB3_SMALL_GAME_MAP_HPP_
#include "GameObject.hpp"
#include "Environment.hpp"
#include "DungeonMap.hpp"
namespace lab3 {
class SmallGameMap: public GameObject {
private:
Environment *big_rock,
*forest_one,
*forest_two,
*forest_three,
*forest_four,
*forest_five,
*forest_six,
*forest_seven,
*forest_eight,
*forest_nine,
*swamp_one,
*swamp_two,
*swamp_three,
*swamp_four,
*mountain_one,
*mountain_two,
*mountain_three;
DungeonMap dm;
public:
SmallGameMap() : GameObject() {
big_rock = new Environment(FOREST_TYPE, "A big glowing rock",
"You stand in front of a big rock.\n"
"Somehow you feel like resting next to the stone makes you healthier."),
forest_one = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees."),
forest_two = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees."),
forest_three = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees."),
forest_four = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees."),
forest_five = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees."),
forest_six = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees."),
forest_seven = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees."),
forest_eight = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees."),
forest_nine = new Environment(FOREST_TYPE, "In the forest",
"You find yourself lost amongst the trees.\n"
"There's a small opening over there."),
swamp_one = new Environment(SWAMP_TYPE,
"A muddy swamp",
"The vegetation changes. It is a bit less dense, but now there is mud everywhere.\n"
"The air is filled with flies and mosquitoes."),
swamp_two = new Environment(SWAMP_TYPE, "A muddy swamp",
"There is mud and water everywhere.\n"
"The air is filled with flies and mosquitoes."),
swamp_three = new Environment(SWAMP_TYPE, "A muddy swamp",
"There is mud and water everywhere.\n"
"The air is filled with flies and mosquitoes."),
swamp_four = new Environment(SWAMP_TYPE, "A muddy swamp",
"There is mud and water everywhere.\n"
"The air is filled with flies and mosquitoes."),
mountain_one = new Environment(MOUNTAIN_TYPE, "The bottom of the mountain",
"The mountain is pretty steep. The vegetation is not as dense anymore."),
mountain_two = new Environment(MOUNTAIN_TYPE, "Halfway up the mountain",
"A small river runs down the side. The top is visible from here."),
mountain_three = new Environment(MOUNTAIN_TYPE, "The top of the mountain",
"The view up here is breathtaking.");
this->dm.ns(big_rock, forest_one);
this->dm.ns(forest_one, forest_two);
this->dm.ns(forest_two, forest_three);
this->dm.ew(forest_three, forest_four);
this->dm.ns(forest_five, forest_four);
this->dm.ns(forest_six, forest_five);
this->dm.ew(forest_six, forest_seven);
this->dm.ns(forest_seven, forest_eight);
this->dm.ns(forest_eight, forest_nine);
this->dm.ew(forest_nine, swamp_one);
this->dm.ns(swamp_one, swamp_two);
this->dm.ew(swamp_two, swamp_three);
this->dm.ns(swamp_three, swamp_four);
this->dm.ns(swamp_four, mountain_one);
this->dm.ud(mountain_two, mountain_one);
}
~SmallGameMap() { }
SmallGameMap(const SmallGameMap &sfm) = delete;
SmallGameMap &operator=(const SmallGameMap &sfm) = delete;
const Environment *getStart() const {
return big_rock;
}
const Environment *getRabbitSpawnOne() const {
return forest_three;
}
const Environment *getRabbitSpawnTwo() const {
return forest_seven;
}
const Environment *getCrocSpawnOne() const {
return swamp_two;
}
const Environment *getCrocSpawnTwo() const {
return swamp_four;
}
DungeonMap *getDungeonMap() {
return &this->dm;
}
const Environment *getBossSpawn() const {
return mountain_two;
}
void addFinalExit() {
this->dm.ud(mountain_three, mountain_two);
}
const Environment *getWinLocation() const {
return mountain_three;
}
};
} // namespace lab3
#endif // LAB3_SMALL_GAME_MAP_HPP_