tetris: let Center/OK/Enter key also hard-drop like 0

This commit is contained in:
Luxferre
2026-10-23 19:55:41 +03:00
parent c9cbc99064
commit 10b67c0f30
3 changed files with 3 additions and 2 deletions
Binary file not shown.
Binary file not shown.
+3 -2
View File
@@ -403,7 +403,6 @@ static void handle_key(KeySym ks) {
} else { } else {
lock_piece(); lock_piece();
} }
nextTick = now_ms() + speed;
} }
break; break;
case XK_space: case XK_0: case XK_space: case XK_0:
@@ -417,7 +416,9 @@ static void handle_key(KeySym ks) {
} }
break; break;
case XK_5: case XK_Return: case XK_KP_Enter: case XK_5: case XK_Return: case XK_KP_Enter:
if (state == PAUSED) { if (state == PLAYING) {
hard_drop();
} else if (state == PAUSED) {
state = PLAYING; nextTick = now_ms() + speed; state = PLAYING; nextTick = now_ms() + speed;
} else if (state == GAMEOVER) { } else if (state == GAMEOVER) {
reset_game(); reset_game();