|
|
@ -70,6 +70,35 @@ void getInput(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** getTInput with parameters to test if working correctly |
|
|
|
* returns char, parameter: char |
|
|
|
*/ |
|
|
|
char getTInput(char key){ |
|
|
|
if(key == '\033'){ |
|
|
|
return 'ar'; |
|
|
|
} |
|
|
|
else{ |
|
|
|
switch(key){ |
|
|
|
case 'w': |
|
|
|
return 'w'; |
|
|
|
case 'a': |
|
|
|
return 'a'; |
|
|
|
case 's': |
|
|
|
return 's'; |
|
|
|
case 'd': |
|
|
|
return 'd'; |
|
|
|
case 'q': |
|
|
|
return 'q'; |
|
|
|
case 'p': |
|
|
|
return 'p'; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** pauses the game until p is pressed again |
|
|
|
* no parameters, no returns |
|
|
|
*/ |
|
|
|