From 93902c57123c8e33f99263474eac726d4dbdceea Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 30 Oct 2019 00:38:04 -0400 Subject: random audio and tetris sound --- lib/cetris.c | 6 +++++- lib/cetris.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/cetris.c b/lib/cetris.c index e2acdec..35d92e3 100644 --- a/lib/cetris.c +++ b/lib/cetris.c @@ -393,8 +393,12 @@ void update_board(cetris_game *g) { g->lines += lines_cleared; if (lines_cleared > 0) { + if (lines_cleared == 4) { + g->tetris_event++; + } else { + g->line_event++; + } g->line_combo++; - g->line_event++; } if (g->lines >= (g->level * 10)) { g->level++; diff --git a/lib/cetris.h b/lib/cetris.h index 435a98d..523b867 100644 --- a/lib/cetris.h +++ b/lib/cetris.h @@ -146,6 +146,7 @@ struct cetris_game { // events uint8_t line_event; uint8_t lock_event; + uint8_t tetris_event; // scoring flags bool tspin; -- cgit v1.2.3-101-g0448