diff --git a/src/input.c b/src/input.c index c353ab7..ce3f93b 100644 --- a/src/input.c +++ b/src/input.c @@ -49,11 +49,22 @@ void getInput(){ else if(key=='q'){ printf("quit"); } + else if(key=='p'){ + printf("game paused, p to continue"); + pause(); + printf("game continued"); + } } } } +pause(){ +while(getch()!='p'){ + sleep(1); +} +} + //khbit und getch aus dem Internet