aboutsummaryrefslogtreecommitdiff
path: root/src/games/tetris/Board.hpp
blob: 0019a7fe9a5b687229256a4f2664badbb1aaf528 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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];
};