aboutsummaryrefslogtreecommitdiff
path: root/src/games/Game.cpp
diff options
context:
space:
mode:
authorfschildt <florian.schildt@protonmail.com>2025-10-01 14:08:24 +0200
committerfschildt <florian.schildt@protonmail.com>2025-10-01 14:09:13 +0200
commitc775ca6133d93ed97359a6a50bd94a5563c740de (patch)
tree9d3efb1c7e7538ff9d5cae408d2c29f9dd3daeab /src/games/Game.cpp
parent41c2e2ecfcccf62b3c646980dd283848e33a8134 (diff)
general refactoring, prepare breakout game
Diffstat (limited to 'src/games/Game.cpp')
-rw-r--r--src/games/Game.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/games/Game.cpp b/src/games/Game.cpp
index 5619c8a..7ed94eb 100644
--- a/src/games/Game.cpp
+++ b/src/games/Game.cpp
@@ -1,8 +1,8 @@
-#include <basic/defs.hpp>
#include <games/Game.hpp>
#include <games/tetris/Tetris.hpp>
#include <games/snake/Snake.hpp>
#include <games/minesweeper/Minesweeper.hpp>
+#include <games/breakout/Breakout.hpp>
#include <assert.h>
#include <memory>
@@ -12,30 +12,29 @@ std::unique_ptr<Game>
Game::Select(GameType type)
{
switch (type) {
- case NO_GAME: {
- return nullptr;
- } break;
+ case no_game: {
+ return nullptr;
+ } break;
- case TETRIS: {
- return std::make_unique<Tetris>();
- } break;
+ case tetris: {
+ return std::make_unique<Tetris>();
+ } break;
- case SNAKE: {
- return std::make_unique<Snake>();
- } break;
+ case snake: {
+ return std::make_unique<Snake>();
+ } break;
- case MINESWEEPER: {
- return std::make_unique<Minesweeper>();
- } break;
+ case minesweeper: {
+ return std::make_unique<Minesweeper>();
+ } break;
- InvalidDefaultCase;
+ case breakout: {
+ return std::make_unique<Breakout>();
+ } break;
+
+ InvalidDefaultCase;
}
return nullptr;
}
-
-Game::~Game()
-{
-}
-