Browse Source

add red coloring for pause

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

11
src/input.c

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

Loading…
Cancel
Save