blob: b0c94151430b9a1cdd44998a73b35895adf95036 (
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
30
31
32
33
|
#pragma once
#include "DB.h"
class Enemy;
class Object;
class Location;
class GameData {
public:
static GameData & get_instance();
private:
DB db { "kerkersendraken.db" };
public:
Enemy * create_enemy(const std::string & name) const;
Object * create_object(const std::string & name) const;
Location * create_location(const std::string & name) const;
public:
void leaderbord_add(const std::string & name, unsigned int gold);
void leaderbord_print() const;
public:
std::vector<std::string> random_objects(unsigned count = 1) const;
std::vector<std::string> random_locations(unsigned count = 1) const;
std::vector<std::string> random_enemies(unsigned count = 1) const;
private:
std::vector<std::string> random_names(const std::string & table, unsigned count) const;
};
|