Browse Source

refactoring: Using const for game symbol constants

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

3
src/main/c/GameTic_Tac_Toe/game.c

@ -4,7 +4,8 @@ char board[3][3] = {{'1', '2', '3'},
{'4', '5', '6'},
{'7', '8', '9'}};
char currentPlayer = 'X';
const char PLAYER_X = 'X';
const char PLAYER_O = 'O';
// Funktionen zur Anzeige des Spielbretts
void displayBoard() {
printf("Tic-Tac-Toe\n");

Loading…
Cancel
Save