Definition at line 78 of file main.cpp.
◆ move_down()
| void anonymous_namespace{main.cpp}::Piece::move_down |
( |
| ) |
|
|
inline |
Definition at line 125 of file main.cpp.
125 {
126 for (Block &block :
blocks) {
127 ++block.y;
128 }
129 }
std::array< Block, 3 > blocks
◆ move_left()
| void anonymous_namespace{main.cpp}::Piece::move_left |
( |
| ) |
|
|
inline |
Definition at line 113 of file main.cpp.
113 {
114 for (Block &block :
blocks) {
115 --block.x;
116 }
117 }
◆ move_right()
| void anonymous_namespace{main.cpp}::Piece::move_right |
( |
| ) |
|
|
inline |
Definition at line 119 of file main.cpp.
119 {
120 for (Block &block :
blocks) {
121 ++block.x;
122 }
123 }
◆ new_piece()
| void anonymous_namespace{main.cpp}::Piece::new_piece |
( |
int | start_x, |
|
|
int | start_y, |
|
|
std::mt19937 & | rng ) |
|
inline |
Definition at line 93 of file main.cpp.
93 {
94 blocks[0] = {start_x, start_y, random_type(rng)};
95 blocks[1] = {start_x, start_y + 1, random_type(rng)};
96 blocks[2] = {start_x, start_y + 2, random_type(rng)};
98 }
◆ 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 100 of file main.cpp.
100 {
103 blocks[0].type = types[2];
104 blocks[1].type = types[0];
105 blocks[2].type = types[1];
106 } else {
107 blocks[0].type = types[1];
108 blocks[1].type = types[2];
109 blocks[2].type = types[0];
110 }
111 }
◆ 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: