Init commit

This commit is contained in:
Administrator 2024-04-17 17:02:16 +00:00
parent 8bd653d363
commit 8c138fe3fe
7 changed files with 30 additions and 8 deletions

View file

@ -24,8 +24,8 @@ void game_loop()
stats_init(&stats);
while (break_flag)
{
if (state == GAMEOVER || state == EXIT_STATE)
{
if (state == GAMEOVER || state == EXIT_STATE || state == FILE_ERROR_STATE)
break_flag = FALSE;
sigact(get_signal(signal), &state, &stats, &map, &frog);
@ -33,4 +33,11 @@ void game_loop()
if (state == MOVING || state == START)
signal = GET_USER_INPUT;
}
if (state == FILE_ERROR_STATE)
{
print_levelerror();
nodelay(stdscr, FALSE);
getch();
}
}