From 0727b1e4c3eef30710738127326349eb44b608df Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 29 Oct 2019 21:13:11 -0400 Subject: minor ui changes --- lib/cetris.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/cetris.c b/lib/cetris.c index ffffd2a..c6aeeea 100644 --- a/lib/cetris.c +++ b/lib/cetris.c @@ -245,7 +245,6 @@ static void hard_drop(cetris_game *g) { g->score += 2 * drop_count; // 2 score for each hard-drop'd cell lock_current(g); - update_board(g); } static void rotate_matrix(cetris_game *g, piece_matrix *m, bool clockwise) { @@ -377,10 +376,11 @@ void update_board(cetris_game *g) { make_ghosts(g); if (g->current.locked && !g->next_piece_tick) { + if (lines_cleared > 0) { g->next_piece_tick = g->tick + g->config.next_piece_delay; } else { - next_piece(g); + g->next_piece_tick = g->tick; g->line_combo = 0; } } @@ -575,11 +575,11 @@ CETRIS_EXPORT bool update_game_tick(cetris_game *g) { } else if (!g->next_das_move && g->das_wait && g->tick >= g->das_wait) { g->next_das_move = g->tick + g->config.das_arr; } -#endif - - if (did_move) update_board(g); +#endif if (g->config.win_condition(g)) g->game_over = true; + if (did_move) update_board(g); + return true; } -- cgit v1.2.3-101-g0448