Browse Source

refactoring: Removing the currentPlayer global variable

remotes/origin/Ariana
Ariana Ginju 11 months ago
committed by David Moeller
parent
commit
0721be55c8
  1. 2
      src/main/c/GameTic_Tac_Toe/game.c

2
src/main/c/GameTic_Tac_Toe/game.c

@ -60,7 +60,7 @@ int isBoardFull() {
// Funktion zum Zug eines Spielers
char switchPlayer(char currentPlayer) {
return (currentPlayer == 'X') ? 'O' : 'X';
return (currentPlayer == PLAYER_X) ? PLAYER_O : PLAYER_X;
}
int isValidMove(int choice) {

Loading…
Cancel
Save