diff --git a/src/main/c/GameTic_Tac_Toe/tictactoe.c b/src/main/c/GameTic_Tac_Toe/tictactoe.c index e7eeee9..e15cf80 100644 --- a/src/main/c/GameTic_Tac_Toe/tictactoe.c +++ b/src/main/c/GameTic_Tac_Toe/tictactoe.c @@ -26,6 +26,13 @@ void displayBoard() { } } +int get_move(){ + int choice; + printf("Spieler %c, waehle eine Zahl (1-9): ", (currentPlayer == PLAYER_X) ? 'X' : 'O'); + scanf("%d", &choice); + return choice; +} + char checkLine(char a, char b, char c) { if (a == b && b == c) return a; return ' '; @@ -97,12 +104,6 @@ int isGameOver() { return (winner == PLAYER_X || winner == PLAYER_O || isBoardFull()); } -int get_move(){ - int choice; - printf("Spieler %c, waehle eine Zahl (1-9): ", (currentPlayer == PLAYER_X) ? 'X' : 'O'); - scanf("%d", &choice); - return choice; -} void printGameResult(char winner) { if (winner == PLAYER_X || winner == PLAYER_O) {