summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cetris.c6
-rw-r--r--lib/cetris.h1
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;