aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/game.hpp
blob: cfff8c5d6218da3900c61b7aa1228eaa652f7178 (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
#pragma once

#include "interfaces/command.hpp"
#include "interfaces/cursor.hpp"
#include "interfaces/scene.hpp"
#include "interfaces/window.hpp"

#include <memory>
#include <unordered_map>

class IGame
{
public:
	virtual ~IGame() = default;

	virtual void run() = 0;

	[[nodiscard]] virtual std::unordered_map<char, std::shared_ptr<ICommand>>
	get_input_config(
		const std::shared_ptr<IWindow> &window, const std::shared_ptr<IScene> &scene,
		const std::shared_ptr<ICursorController> &cursor_controller) const noexcept = 0;
};

using IGameFactory = std::shared_ptr<IGame> (*)();