|
@ -6,6 +6,7 @@ |
|
|
#include<termios.h> |
|
|
#include<termios.h> |
|
|
int kbhit(void); |
|
|
int kbhit(void); |
|
|
char getch(void); |
|
|
char getch(void); |
|
|
|
|
|
void Pausieren(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*int main(int argc, char ** argv){ |
|
|
/*int main(int argc, char ** argv){ |
|
@ -60,7 +61,7 @@ void getInput(){ |
|
|
case 'p': |
|
|
case 'p': |
|
|
printf("\033[31mgame paused, p to continue"); |
|
|
printf("\033[31mgame paused, p to continue"); |
|
|
printf("\033[0m"); |
|
|
printf("\033[0m"); |
|
|
pause(); |
|
|
|
|
|
|
|
|
Pausieren(); |
|
|
printf("\033[32mgame continued"); |
|
|
printf("\033[32mgame continued"); |
|
|
printf("\033[0m"); |
|
|
printf("\033[0m"); |
|
|
break; |
|
|
break; |
|
@ -102,7 +103,7 @@ char getTInput(char key){ |
|
|
/** pauses the game until p is pressed again |
|
|
/** pauses the game until p is pressed again |
|
|
* no parameters, no returns |
|
|
* no parameters, no returns |
|
|
*/ |
|
|
*/ |
|
|
void pause(){ |
|
|
|
|
|
|
|
|
void Pausieren(){ |
|
|
while(getch()!='p'){ |
|
|
while(getch()!='p'){ |
|
|
sleep(0.10); |
|
|
sleep(0.10); |
|
|
} |
|
|
} |
|
|