|
|
@ -46,7 +46,17 @@ Player getCurrentPlayer(const TicTacToeGame * game) { |
|
|
|
return game->currentPlayer; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int getNumberOfMoves(const TicTacToeGame* game) { |
|
|
|
int moves = 0; |
|
|
|
for (int i = 0; i < 3; ++i) { |
|
|
|
for (int j = 0; j < 3; ++j) { |
|
|
|
if (game->board[i][j] != EMPTY) { |
|
|
|
moves++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return moves; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|