diff options
| author | 2019-10-30 00:38:04 -0400 | |
|---|---|---|
| committer | 2019-10-30 00:38:04 -0400 | |
| commit | 93902c57123c8e33f99263474eac726d4dbdceea (patch) | |
| tree | 5231712efba19bb089073dc26eba7855f0961a3d /lib | |
| parent | dc41a8416c82925a2ac42b252ef00e35b18f55ed (diff) | |
| download | cetris-93902c57123c8e33f99263474eac726d4dbdceea.tar.gz cetris-93902c57123c8e33f99263474eac726d4dbdceea.tar.bz2 cetris-93902c57123c8e33f99263474eac726d4dbdceea.zip | |
random audio and tetris sound
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/cetris.c | 6 | ||||
| -rw-r--r-- | lib/cetris.h | 1 |
2 files changed, 6 insertions, 1 deletions
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; |