Browse Source

check winner

remotes/origin/fdai7775-main-patch-54732
fdai7775 11 months ago
parent
commit
097e26462e
  1. 7
      src/main/c/GameTic_Tac_Toe/game.c

7
src/main/c/GameTic_Tac_Toe/game.c

@ -69,3 +69,10 @@ int main() {
while (1) {
displayBoard();
makeMove();
char winner = checkWinner();
if (winner == 'X' || winner == 'O') {
displayBoard();
printf("Spieler %c gewinnt!\n", winner);
break;
}
Loading…
Cancel
Save