aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/game.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-22 23:13:29 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:59 +0200
commitb74611d2b20fc071b8a699f2ce25e61f60118d6e (patch)
tree55d4dbf727724f7f527f2acebea83abd34317329 /src/interfaces/game.hpp
parentb1183c712d94d38f75068bd62df006f73bd3550f (diff)
refactor: improve input handling & remove commands
Diffstat (limited to 'src/interfaces/game.hpp')
-rw-r--r--src/interfaces/game.hpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/interfaces/game.hpp b/src/interfaces/game.hpp
index a54782a..3aac6a9 100644
--- a/src/interfaces/game.hpp
+++ b/src/interfaces/game.hpp
@@ -2,12 +2,12 @@
#include "interfaces/command.hpp"
#include "interfaces/cursor.hpp"
+#include "interfaces/input.hpp"
#include "interfaces/scene.hpp"
#include <yacppdic/factory.hpp>
#include <memory>
-#include <unordered_map>
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IGame
@@ -20,11 +20,9 @@ public:
virtual void on_update() noexcept = 0;
virtual void on_exit() const noexcept = 0;
-
- [[nodiscard]] virtual auto get_input_config() const noexcept
- -> std::unordered_map<char, std::shared_ptr<ICommand>> = 0;
};
using IGameFactory = yacppdic::Factory<std::unique_ptr<IGame>(
const std::shared_ptr<IScene> &scene,
- const std::shared_ptr<ICursorController> &cursor_controller)>;
+ const std::shared_ptr<ICursorController> &cursor_controller,
+ const std::shared_ptr<IUserInputObserver> user_input_observer)>;