Browse Source

add red coloring for pause

main
fdai7184 2 years ago
parent
commit
d922d37547
  1. 5
      src/input.c

5
src/input.c

@ -9,7 +9,7 @@ char getch(void);
/*int main(int argc, char ** argv){ /*int main(int argc, char ** argv){
printf("wasd or arrows to control snake, q to quit, p to pause game.");
printf("wasd or arrows to control snake, q to quit, p to pause game.");
while(1){ while(1){
getInput(); getInput();
} }
@ -51,7 +51,8 @@ void getInput(){
printf("quit"); printf("quit");
} }
else if(key=='p'){ else if(key=='p'){
printf("game paused, p to continue");
printf("\033[31mgame paused, p to continue");
printf("\033[0m");
pause(); pause();
printf("game continued"); printf("game continued");
} }

Loading…
Cancel
Save