blob: 0d7577dd531e2a07414885922616702426cdbb12 (
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
|
#pragma once
#include <memory>
#include "DB.h"
class Enemy;
class Object;
class Location;
class GameData {
public:
static GameData & get_instance();
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) const;
void leaderbord_print() const;
std::vector<std::string> random_locations(unsigned count = 1);
private:
GameData();
virtual ~GameData() = default;
private:
std::unique_ptr<DB> db = nullptr;
};
|