Browse Source

refactoring: Using const for game symbol constants

remotes/origin/fdai7775-main-patch-54732
fdai7775 11 months ago
parent
commit
1abf73507e
  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'}, {'4', '5', '6'},
{'7', '8', '9'}}; {'7', '8', '9'}};
char currentPlayer = 'X'; char currentPlayer = 'X';
const char PLAYER_X = 'X';
const char PLAYER_O = 'O';
// Funktionen zur Anzeige des Spielbretts // Funktionen zur Anzeige des Spielbretts
void displayBoard() { void displayBoard() {
printf("Tic-Tac-Toe\n"); printf("Tic-Tac-Toe\n");

Loading…
Cancel
Save