aboutsummaryrefslogtreecommitdiff
path: root/src/games/tetris/Board.hpp
blob: 2e2edb2a982b6e179e1bd0d8aa49fc52a9fc9a1f (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
31
#pragma once

#include <common/defs.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);


private:
    int32_t ClearRows(int32_t y0);


private:
    friend class Tetromino;
    uint16_t m_Bitmap[24];
    uint8_t m_Idmap[22][10];
};