From 1d25e840019c6b077685d0ecf3df76f132f4be63 Mon Sep 17 00:00:00 2001 From: KaffeeMaus Date: Fri, 26 Jan 2024 11:31:08 +0100 Subject: [PATCH] added commands and their functions --- src/main/c/Georg/tictactoe.c | 10 ++++++++++ src/main/c/Georg/tictactoe.h | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/src/main/c/Georg/tictactoe.c b/src/main/c/Georg/tictactoe.c index c3b5525..362855a 100644 --- a/src/main/c/Georg/tictactoe.c +++ b/src/main/c/Georg/tictactoe.c @@ -30,4 +30,14 @@ int handleCommand( char* input ){ }else if( strcmp(input, "start game") == 0 ){ return 1; } +} + +int startMenu(){ + + return 0; +} + +int startGame(){ + + return 0; } \ No newline at end of file diff --git a/src/main/c/Georg/tictactoe.h b/src/main/c/Georg/tictactoe.h index d054a66..8ce9344 100644 --- a/src/main/c/Georg/tictactoe.h +++ b/src/main/c/Georg/tictactoe.h @@ -5,9 +5,16 @@ struct ticTacToe{ int currentState; }; +// Typdefinition für einen Funktionszeiger +typedef int (*commandFunction)(); + char* getWelcomeMessage(); char* getRulesMessage(); struct ticTacToe createTicTacToe(); int handleCommand( char* input ); +/* commands */ +int startMenu(); +int startGame(); + #endif //TICTACTOE_H