diff options
author | Oxore <oxore@protonmail.com> | 2018-07-09 07:45:56 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2018-07-09 07:45:56 +0300 |
commit | 7d6b30bd06492aab52fb0ca111e2a9d4e38ac99b (patch) | |
tree | ca73790b7cacbd29219ed0778881b9f66f76fcb9 /src | |
parent | a3eaa5d7cd4bdb5cf1977c4cd4e8b4dd28e737ea (diff) |
Fix hard drop when out of field boundaryv0.2.0
Diffstat (limited to 'src')
-rw-r--r-- | src/engine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine.c b/src/engine.c index fd00e34..49f3f9c 100644 --- a/src/engine.c +++ b/src/engine.c @@ -228,7 +228,10 @@ static void signal_up() static void signal_harddrop() { while (field_move_shape_down(&fld, 1)); - transition_put_shape(); + if (field_shape_out_of_bounds(&fld, &fld.shape[1])) + transition_game_over(); + else + transition_put_shape(); sfClock_restart(game.gameTick); sfClock_restart(game.putTick); } |