From b0ab522b586abbe1f9d30fc74740c82d87667abc Mon Sep 17 00:00:00 2001 From: Rorikstr | Rust Dev Date: Fri, 26 Sep 2025 14:23:10 +0300 Subject: [PATCH] now it draws all seven --- src/brick_game/tetris/tetris.c | 4 ++-- src/gui/cli/main.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/brick_game/tetris/tetris.c b/src/brick_game/tetris/tetris.c index c19dc19..fe6451e 100644 --- a/src/brick_game/tetris/tetris.c +++ b/src/brick_game/tetris/tetris.c @@ -8,7 +8,7 @@ static GameStateData game_state = {0}; static bool initialized = false; const int (*get_figure_shape(FigureType type, int rotation))[4] { - static const int shapes[FIGURE_COUNT][4][4][4] = { + static const int shapes[FIGURE_COUNT + 1][4][4][4] = { // I { { @@ -222,6 +222,6 @@ void user_input(UserAction_t action) { } } -GameStateData* getGameState() { +GameStateData* get_game_state() { return &game_state; } \ No newline at end of file diff --git a/src/gui/cli/main.c b/src/gui/cli/main.c index 56da0b5..8bc3402 100644 --- a/src/gui/cli/main.c +++ b/src/gui/cli/main.c @@ -17,9 +17,8 @@ int main() { timeout(100); // Таймаут для getch() int ch; - bool hold = false; UserAction_t action = Undefined; - while (!Terminate) { + while (action != Terminate) { ch = getch();