Fix blocks incorrectly spawning on no field change
See https://github.com/Tiehuis/2048-cli/issues/14.
This commit is contained in:
parent
cd13ef000f
commit
28b4a46336
|
@ -57,6 +57,9 @@ get_new_key:;
|
|||
gamestate_tick(s, g, direction, g->opts->animate && g->opts->interactive
|
||||
? draw_then_sleep : NULL);
|
||||
|
||||
if (g->moved == 0)
|
||||
goto get_new_key;
|
||||
|
||||
int spawned;
|
||||
for (spawned = 0; spawned < g->opts->spawn_rate; spawned++)
|
||||
gamestate_new_block(g);
|
||||
|
|
Loading…
Reference in New Issue
Block a user