aboutsummaryrefslogtreecommitdiff
path: root/frontend/GameData.h
blob: 81e16c17b81c6670005154869113716cc55b288c (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
#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);
	Object * create_object(const std::string & name);
	Location * create_location(const std::string & name);

public:
	void leaderbord_add(const std::string & name, unsigned int gold);
	std::vector<std::string> random_locations(unsigned count = 1);

private:
	GameData();
	virtual ~GameData() = default;

private:
	std::unique_ptr<DB> db = nullptr;
};