From 6e61737e180c03b4e96297281163ed10dc5d2719 Mon Sep 17 00:00:00 2001 From: fdai7184 Date: Fri, 10 Feb 2023 21:40:23 +0100 Subject: [PATCH] refactoring: Klammersetzung und Leerzeichen --- src/input.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/input.c b/src/input.c index 0754d13..600ceb0 100644 --- a/src/input.c +++ b/src/input.c @@ -16,6 +16,7 @@ void Pausieren(); } }*/ + /** getInput gets the userinput and reacts to input of w,a,s,d, arrow keys, p or q * utilises getch() and kbhit, no parameters, no returns */ @@ -37,7 +38,6 @@ char getInput(){ } } else{ - switch(key){ case 'w': return 'u'; @@ -58,7 +58,6 @@ char getInput(){ break; } } - } } @@ -86,8 +85,6 @@ char getTInput(char key){ } return 'n'; } - - } @@ -129,8 +126,7 @@ int kbhit(void){ return 0; } -char getch(void) -{ +char getch(void){ char c; system("stty raw"); c= getchar();