blob: 66a1fa357bd5d7bd72d19152b1a0187ae7bf6fbf (
plain)
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
|
#include "Location.h"
#include "Dungeon.h"
#include "RNG.h"
#include "util.h"
Dungeon::Dungeon() {
}
Dungeon::~Dungeon() {
safe_free(this->locations);
}
void Dungeon::update() {
}
void Dungeon::add_location(Location * location) {
this->locations.push_back(location);
}
Location * Dungeon::get_start_location() {
size_t size = this->locations.size();
if (size == 0) return nullptr;
size_t index = RNG::get().rand_int(size);
return this->locations[index];
}
|