|
@ -58,6 +58,20 @@ int getNumberOfMoves(const TicTacToeGame* game) { |
|
|
return moves; |
|
|
return moves; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int isBoardFull(const TicTacToeGame* game) { |
|
|
|
|
|
for (int i = 0; i < 3; ++i) { |
|
|
|
|
|
for (int j = 0; j < 3; ++j) { |
|
|
|
|
|
if (game->board[i][j] == EMPTY) { |
|
|
|
|
|
return 0; // Das Spielfeld ist nicht vollständig gefüllt |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return 1; // Das Spielfeld ist vollständig gefüllt |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xxxxxxxxxx