From d922d375474b0441210210af18b4873c665a316d Mon Sep 17 00:00:00 2001 From: fdai7184 Date: Thu, 9 Feb 2023 20:09:05 +0100 Subject: [PATCH] add red coloring for pause --- src/input.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/input.c b/src/input.c index 46c3697..8ff6416 100644 --- a/src/input.c +++ b/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"); }