Browse Source

refactoring: using const

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