Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Alx-Lai committed Aug 18, 2024
1 parent 14f728d commit 6176094
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fw/Core/Hitcon/App/TetrisApp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ void TetrisApp::periodic_task_callback(void *) {
fall_period = hitcon::tetris::MIN_FALL_PERIOD;
}

if (fall_period < hitcon::tetris::MIN_FALL_PERIOD) {
fall_period = hitcon::tetris::MIN_FALL_PERIOD;
}

if (now - last_fall_time >= fall_period) {
game.game_fall_down_tetromino();
last_fall_time = now;
Expand Down

0 comments on commit 6176094

Please sign in to comment.