aboutsummaryrefslogtreecommitdiff
path: root/src/games/tetris/Board.hpp
blob: a91556b27bc3d5d42def76bbc3b47f68e302d2e6 (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 <common/defs.hpp>


class Tetromino;

struct BoardPos {
    int32_t x;
    int32_t y;
};


class Board {
public:
    void Reset();
    int32_t PlaceTetromino(Tetromino &tetromino);
    void Draw(int32_t level);


private:
    int32_t ClearRows(int32_t y0);


private:
    friend class Tetris;
    uint16_t m_bitmap[24];
    uint8_t m_idmap[22][10];
};