Definition at line 78 of file main.cpp.
◆ move_down()
| void anonymous_namespace{main.cpp}::Piece::move_down |
( |
| ) |
|
|
inline |
Definition at line 127 of file main.cpp.
127 {
128 for (Block &block :
blocks) {
129 ++block.y;
130 }
131 }
std::array< Block, 3 > blocks
◆ move_left()
| void anonymous_namespace{main.cpp}::Piece::move_left |
( |
| ) |
|
|
inline |
Definition at line 115 of file main.cpp.
115 {
116 for (Block &block :
blocks) {
117 --block.x;
118 }
119 }
◆ move_right()
| void anonymous_namespace{main.cpp}::Piece::move_right |
( |
| ) |
|
|
inline |
Definition at line 121 of file main.cpp.
121 {
122 for (Block &block :
blocks) {
123 ++block.x;
124 }
125 }
◆ new_piece()
| void anonymous_namespace{main.cpp}::Piece::new_piece |
( |
int | start_x, |
|
|
int | start_y, |
|
|
std::mt19937 & | rng ) |
|
inline |
Definition at line 95 of file main.cpp.
95 {
96 blocks[0] = {start_x, start_y, random_type(rng)};
97 blocks[1] = {start_x, start_y + 1, random_type(rng)};
98 blocks[2] = {start_x, start_y + 2, random_type(rng)};
100 }
◆ rotate_left()
| void anonymous_namespace{main.cpp}::Piece::rotate_left |
( |
| ) |
|
|
inline |
◆ rotate_right()
| void anonymous_namespace{main.cpp}::Piece::rotate_right |
( |
| ) |
|
|
inline |
◆ shift()
| void anonymous_namespace{main.cpp}::Piece::shift |
( |
ShiftDirection | direction | ) |
|
|
inline |
Definition at line 102 of file main.cpp.
102 {
105 blocks[0].type = types[2];
106 blocks[1].type = types[0];
107 blocks[2].type = types[1];
108 } else {
109 blocks[0].type = types[1];
110 blocks[1].type = types[2];
111 blocks[2].type = types[0];
112 }
113 }
◆ blocks
| std::array<Block, 3> anonymous_namespace{main.cpp}::Piece::blocks {} |
◆ colors
| std::array< int, piece_height > anonymous_namespace{main.cpp}::Piece::colors {} |
◆ next_colors
| std::array< int, piece_height > anonymous_namespace{main.cpp}::Piece::next_colors {} |
◆ position
| int anonymous_namespace{main.cpp}::Piece::position = 0 |
| int anonymous_namespace{main.cpp}::Piece::x = 3 |
| int anonymous_namespace{main.cpp}::Piece::y = 0 |
The documentation for this struct was generated from the following files: