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();