diff options
Diffstat (limited to 'src/games')
| -rw-r--r-- | src/games/Game.cpp | 9 | ||||
| -rw-r--r-- | src/games/Game.hpp | 2 | ||||
| -rw-r--r-- | src/games/minesweeper/Minesweeper.cpp | 12 | ||||
| -rw-r--r-- | src/games/minesweeper/Minesweeper.hpp | 6 | ||||
| -rw-r--r-- | src/games/snake/Snake.cpp | 11 | ||||
| -rw-r--r-- | src/games/snake/Snake.hpp | 4 | ||||
| -rw-r--r-- | src/games/tetris/Board.cpp | 8 | ||||
| -rw-r--r-- | src/games/tetris/Board.hpp | 2 | ||||
| -rw-r--r-- | src/games/tetris/Tetris.cpp | 10 | ||||
| -rw-r--r-- | src/games/tetris/Tetris.hpp | 9 | ||||
| -rw-r--r-- | src/games/tetris/Tetromino.cpp | 6 | ||||
| -rw-r--r-- | src/games/tetris/Tetromino.hpp | 5 |
12 files changed, 35 insertions, 49 deletions
diff --git a/src/games/Game.cpp b/src/games/Game.cpp index 7c63b4f..0f6be9c 100644 --- a/src/games/Game.cpp +++ b/src/games/Game.cpp @@ -1,7 +1,8 @@ -#include <games/Game.hpp> -#include <games/tetris/Tetris.hpp> -#include <games/snake/Snake.hpp> -#include <games/minesweeper/Minesweeper.hpp> +#include "games/Game.hpp" +#include "games/tetris/Tetris.hpp" +#include "games/snake/Snake.hpp" +#include "games/minesweeper/Minesweeper.hpp" +#include "common/defs.hpp" #include <assert.h> #include <memory> diff --git a/src/games/Game.hpp b/src/games/Game.hpp index e9eed82..8a44ba9 100644 --- a/src/games/Game.hpp +++ b/src/games/Game.hpp @@ -1,7 +1,5 @@ #pragma once -#include <common/defs.hpp> - #include <SDL3/SDL.h> #include <imgui.h> diff --git a/src/games/minesweeper/Minesweeper.cpp b/src/games/minesweeper/Minesweeper.cpp index 5cc3215..3638af8 100644 --- a/src/games/minesweeper/Minesweeper.cpp +++ b/src/games/minesweeper/Minesweeper.cpp @@ -1,5 +1,5 @@ -#include <games/minesweeper/Minesweeper.hpp> -#include <renderer/Renderer.hpp> +#include "games/minesweeper/Minesweeper.hpp" +#include "renderer/Renderer.hpp" #include <imgui.h> @@ -7,14 +7,6 @@ #include <random> -// Todo: -// - First click may not be a mine! -// - Show current time spent -// - Show current flags/mines left -// - Permit uncovering of flagged cell -// - Game Over: Show Highscore for selected difficulty - - static constexpr Color s_mine_count_colors[8] = { {0.0f, 0.0f, 1.0f, 1.0f}, // Blue {0.0f, 0.5f, 0.0f, 1.0f}, // Green diff --git a/src/games/minesweeper/Minesweeper.hpp b/src/games/minesweeper/Minesweeper.hpp index 1db77ff..9088d10 100644 --- a/src/games/minesweeper/Minesweeper.hpp +++ b/src/games/minesweeper/Minesweeper.hpp @@ -1,8 +1,8 @@ #pragma once -#include <games/Game.hpp> -#include <common/math.hpp> -#include <common/Font.hpp> +#include "games/Game.hpp" +#include "common/math.hpp" +#include "common/Font.hpp" class Minesweeper : public Game { diff --git a/src/games/snake/Snake.cpp b/src/games/snake/Snake.cpp index 81de4f0..7dc7f9d 100644 --- a/src/games/snake/Snake.cpp +++ b/src/games/snake/Snake.cpp @@ -1,11 +1,8 @@ -#include <games/snake/Snake.hpp> -#include <renderer/Renderer.hpp> -#include <imgui.h> - +#include "games/snake/Snake.hpp" +#include "renderer/Renderer.hpp" +#include "common/defs.hpp" -// Todo: -// - gradiant from head to tail -// - reduce thickness from head to tail +#include <imgui.h> std::mt19937 Snake::s_rng{std::random_device{}()}; diff --git a/src/games/snake/Snake.hpp b/src/games/snake/Snake.hpp index 103255c..25facd1 100644 --- a/src/games/snake/Snake.hpp +++ b/src/games/snake/Snake.hpp @@ -1,7 +1,7 @@ #pragma once -#include <games/Game.hpp> -#include <common/math.hpp> +#include "games/Game.hpp" +#include "common/math.hpp" #include <random> diff --git a/src/games/tetris/Board.cpp b/src/games/tetris/Board.cpp index a1ab72a..9018e46 100644 --- a/src/games/tetris/Board.cpp +++ b/src/games/tetris/Board.cpp @@ -1,7 +1,7 @@ -#include <games/tetris/Board.hpp> -#include <games/tetris/Tetromino.hpp> -#include <games/Game.hpp> -#include <renderer/Renderer.hpp> +#include "games/tetris/Board.hpp" +#include "games/tetris/Tetromino.hpp" +#include "games/Game.hpp" +#include "renderer/Renderer.hpp" void Board::Reset() diff --git a/src/games/tetris/Board.hpp b/src/games/tetris/Board.hpp index a91556b..ae6aa0d 100644 --- a/src/games/tetris/Board.hpp +++ b/src/games/tetris/Board.hpp @@ -1,6 +1,6 @@ #pragma once -#include <common/defs.hpp> +#include <cstdint> class Tetromino; diff --git a/src/games/tetris/Tetris.cpp b/src/games/tetris/Tetris.cpp index 8db772f..8b3c5bd 100644 --- a/src/games/tetris/Tetris.cpp +++ b/src/games/tetris/Tetris.cpp @@ -1,8 +1,8 @@ -#include <games/Game.hpp> -#include <games/tetris/Tetromino.hpp> -#include <games/tetris/Tetris.hpp> -#include <renderer/Renderer.hpp> -#include <common/MemoryManager.hpp> +#include "games/Game.hpp" +#include "games/tetris/Tetromino.hpp" +#include "games/tetris/Tetris.hpp" +#include "renderer/Renderer.hpp" +#include "common/MemoryManager.hpp" #include <SDL3/SDL_events.h> #include <SDL3/SDL_timer.h> diff --git a/src/games/tetris/Tetris.hpp b/src/games/tetris/Tetris.hpp index 44ed9ff..5864ff7 100644 --- a/src/games/tetris/Tetris.hpp +++ b/src/games/tetris/Tetris.hpp @@ -1,10 +1,9 @@ #pragma once -#include <common/defs.hpp> -#include <games/Game.hpp> -#include <games/tetris/Tetromino.hpp> -#include <games/tetris/Board.hpp> -#include <common/Font.hpp> +#include "games/Game.hpp" +#include "games/tetris/Tetromino.hpp" +#include "games/tetris/Board.hpp" +#include "common/Font.hpp" class Tetris : public Game { diff --git a/src/games/tetris/Tetromino.cpp b/src/games/tetris/Tetromino.cpp index ad75161..aa9ed59 100644 --- a/src/games/tetris/Tetromino.cpp +++ b/src/games/tetris/Tetromino.cpp @@ -1,6 +1,6 @@ -#include <games/tetris/Tetromino.hpp> -#include <games/Game.hpp> -#include <renderer/Renderer.hpp> +#include "games/tetris/Tetromino.hpp" +#include "games/Game.hpp" +#include "renderer/Renderer.hpp" #include <random> diff --git a/src/games/tetris/Tetromino.hpp b/src/games/tetris/Tetromino.hpp index 86821b9..ca4d788 100644 --- a/src/games/tetris/Tetromino.hpp +++ b/src/games/tetris/Tetromino.hpp @@ -1,8 +1,7 @@ #pragma once -#include <common/defs.hpp> -#include <common/math.hpp> -#include <games/tetris/Board.hpp> +#include "common/math.hpp" +#include "games/tetris/Board.hpp" class Tetromino { |
