Browse Source

add getTInput to test Input

main
fdai7184 2 years ago
parent
commit
d05a98f3eb
  1. 29
      src/input.c

29
src/input.c

@ -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
*/

Loading…
Cancel
Save