Browse Source

refactoring: using const

remotes/origin/fdai7775-main-patch-54732
fdai7775 11 months ago
parent
commit
36d75c111c
  1. 6
      src/main/c/GameTic_Tac_Toe/game.c

6
src/main/c/GameTic_Tac_Toe/game.c

@ -43,9 +43,11 @@ char checkWinner() {
}
// Funktion zur Überprüfung, ob das Spiel unentschieden ist
const int BOARD_SIZE = 3;
int isBoardFull() {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
for (int i = 0; i < BOARD_SIZE; i++) {
for (int j = 0; j < BOARD_SIZE; j++) {
if (board[i][j] != 'X' && board[i][j] != 'O') {
return 0;
}

Loading…
Cancel
Save