diff --git a/src/c/main.c b/src/c/main.c index ecf1c18..ecaa444 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -13,6 +13,7 @@ char *gameInstructionsFile = "../../src/content/game_instructions.txt"; // function declarations void printInit(); void acceptInstructions(); +void processInput(); int main() { @@ -34,7 +35,7 @@ int main() // NEXT STEP: // Processing - // processInput(userInput); + processInput(userInput); } } return 0; @@ -93,4 +94,18 @@ void acceptInstructions() printf("Invalid Input!\n"); } } +} + +//process user input +void processInput(char userInput[20]) +{ + if (strcmp(userInput, "esc") == 0 || strcmp(userInput, "exit") == 0 || strcmp(userInput, "quit") == 0) + { + gameRunning = 0; + printf("!GAME EXIT!\n"); + } + else + { + printf("Wrong Input!\n"); + } } \ No newline at end of file