aboutsummaryrefslogtreecommitdiff
path: root/src/engine/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/engine.cpp')
-rw-r--r--src/engine/engine.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp
index a05fed9..3bf8503 100644
--- a/src/engine/engine.cpp
+++ b/src/engine/engine.cpp
@@ -5,10 +5,13 @@
#include <thread>
#include <utility>
-CLIGameEngine::CLIGameEngine(IGameFactory game_factory, ISceneFactory scene_factory,
- std::shared_ptr<IInputHandler> input_handler,
- std::shared_ptr<ICursorController> cursor_controller,
- std::shared_ptr<IWindow> window) noexcept
+CLIGameEngine::CLIGameEngine(
+ IGameFactory game_factory,
+ ISceneFactory scene_factory,
+ std::shared_ptr<IInputHandler> input_handler,
+ std::shared_ptr<ICursorController> cursor_controller,
+ std::shared_ptr<IWindow> window
+) noexcept
: _game_factory(std::move(game_factory)),
_scene_factory(std::move(scene_factory)),
_input_handler(std::move(input_handler)),
@@ -35,7 +38,8 @@ void CLIGameEngine::start() noexcept
_input_handler->leave_raw_mode();
game->on_exit();
- }));
+ }
+ ));
_configure_input(game->get_input_config());
@@ -43,7 +47,8 @@ void CLIGameEngine::start() noexcept
[this]()
{
_input_handler->listen();
- }));
+ }
+ ));
while (true)
{
@@ -52,7 +57,8 @@ void CLIGameEngine::start() noexcept
}
void CLIGameEngine::_configure_input(
- const std::unordered_map<char, std::shared_ptr<ICommand>> &input_config) noexcept
+ const std::unordered_map<char, std::shared_ptr<ICommand>> &input_config
+) noexcept
{
for (const auto &config_pair : input_config)
{