From ea5cd08dd67f9bc4351ecebdda9e310a8072ae32 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 2 Jun 2022 20:27:48 +0200 Subject: refactor: move main function to engine --- src/CMakeLists.txt | 2 +- src/engine/main.cpp | 13 +++++++++++++ src/game_of_life.cpp | 12 ------------ 3 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 src/engine/main.cpp delete mode 100644 src/game_of_life.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7c7c58f..85ef2b9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,13 +9,13 @@ function(target_link_libraries_system target) endfunction(target_link_libraries_system) file(GLOB SOURCES - game_of_life.cpp bootstrap.cpp util/color.cpp game/game.cpp game/status_manager.cpp game/generation_tracker.cpp engine/engine.cpp + engine/main.cpp engine/data/vector2.cpp engine/data/bounds.cpp engine/graphics/scene.cpp diff --git a/src/engine/main.cpp b/src/engine/main.cpp new file mode 100644 index 0000000..b4955b5 --- /dev/null +++ b/src/engine/main.cpp @@ -0,0 +1,13 @@ +#include "interfaces/engine.hpp" + +#include "bootstrap.hpp" + +auto main() noexcept -> int +{ + auto container = bootstrap(); + + auto engine = container.get(); + + engine->start(); +} + diff --git a/src/game_of_life.cpp b/src/game_of_life.cpp deleted file mode 100644 index c0f8630..0000000 --- a/src/game_of_life.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "interfaces/engine.hpp" - -#include "bootstrap.hpp" - -auto main() noexcept -> int -{ - auto container = bootstrap(); - - auto engine = container.get(); - - engine->start(); -} -- cgit v1.2.3-18-g5258