From acb78f0835a458377495d6417f93110c45d07816 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 28 Jul 2026 03:23:28 -0300 Subject: fixed a couple bugs --- games/gamemaze.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'games/gamemaze.c') diff --git a/games/gamemaze.c b/games/gamemaze.c index 6e563cf..d4fb956 100644 --- a/games/gamemaze.c +++ b/games/gamemaze.c @@ -37,7 +37,7 @@ static void stop() { clear(); refresh(); endwin(); - if(won){addstat(&rat.fun); printf("the rat feels less hungry...\n\n");} + if(won){addstat(&rat.fun);} won = 0; found = 0; running = 0; @@ -270,10 +270,9 @@ void gamemaze(){ running = 1; while (running) { - if (!running) stop(); int ch = getch(); switch (ch) { - case 'q': case 'Q': stop(); break; + case 'q': case 'Q': running = 0; break; case 'r': case 'R': properrestart(&curs, &W, &H); break; case 'a': case 'A': case KEY_LEFT: if(curs.posx > 0 && !iswall(curs.posy, curs.posx - 1)){ -- cgit v1.3-2-g0d8e