summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2019-10-29 21:13:11 -0400
committerAndrew Opalach <andrew@akon.city> 2019-10-29 21:13:11 -0400
commit0727b1e4c3eef30710738127326349eb44b608df (patch)
treec55b0f8116a00103dc552a2cc03a79aa98951e33 /lib
parenteec7f34b99db9144ed8d3bb241e8806a56886ae5 (diff)
downloadcetris-0727b1e4c3eef30710738127326349eb44b608df.tar.gz
cetris-0727b1e4c3eef30710738127326349eb44b608df.tar.bz2
cetris-0727b1e4c3eef30710738127326349eb44b608df.zip
minor ui changes
Diffstat (limited to 'lib')
-rw-r--r--lib/cetris.c10
1 files changed, 5 insertions, 5 deletions
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;
}