From b46a0d9369fbaa1938f0968ab216bc2d564a9c37 Mon Sep 17 00:00:00 2001 From: fschildt Date: Mon, 21 Jul 2025 16:07:28 +0200 Subject: first commit --- src/games/tetris/Board.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/games/tetris/Board.hpp (limited to 'src/games/tetris/Board.hpp') 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 +#include + +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]; +}; + -- cgit v1.2.3