diff options
author | fschildt <florian.schildt@protonmail.com> | 2025-07-21 16:07:28 +0200 |
---|---|---|
committer | fschildt <florian.schildt@protonmail.com> | 2025-07-21 16:07:28 +0200 |
commit | b46a0d9369fbaa1938f0968ab216bc2d564a9c37 (patch) | |
tree | c28b75187d01be9642af56a54a6101f51b25e4a7 /src/games/tetris/Board.hpp |
Diffstat (limited to 'src/games/tetris/Board.hpp')
-rw-r--r-- | src/games/tetris/Board.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/games/tetris/Board.hpp b/src/games/tetris/Board.hpp new file mode 100644 index 0000000..0019a7f --- /dev/null +++ b/src/games/tetris/Board.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include <basic/defs.hpp> +#include <renderer/RenderGroup.hpp> + +class Tetromino; + +struct BoardPos { + int32_t x; + int32_t y; +}; + +class Board { +public: + Board(); + + int32_t PlaceTetromino(Tetromino &tetromino); + void Draw(int32_t level, RenderGroup& render_group); + + +private: + int32_t ClearRows(int32_t y0); + + +private: + friend class Tetromino; + uint16_t m_Bitmap[24]; + uint8_t m_Idmap[22][10]; +}; + |