Browse Source

check winner

remotes/origin/Ariana
Ariana Ginju 11 months ago
committed by David Moeller
parent
commit
bd7b0a63c6
  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