aboutsummaryrefslogtreecommitdiff
path: root/games/gamemaze.c
diff options
context:
space:
mode:
authordavid <[email protected]>2026-07-28 03:23:28 -0300
committerdavid <[email protected]>2026-07-28 03:23:28 -0300
commitacb78f0835a458377495d6417f93110c45d07816 (patch)
treeb5bbf282e44a45060f45fd4bc0894dceb29ee664 /games/gamemaze.c
parent64d81da061d573fcd5b0a814cdc38844854cb211 (diff)
downloadpetratc-acb78f0835a458377495d6417f93110c45d07816.tar.gz
petratc-acb78f0835a458377495d6417f93110c45d07816.zip
fixed a couple bugs
Diffstat (limited to 'games/gamemaze.c')
-rw-r--r--games/gamemaze.c5
1 files changed, 2 insertions, 3 deletions
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)){