fix le code du prof

This commit is contained in:
Mylloon 2023-04-11 15:06:39 +02:00
parent cedc53cfab
commit 9a160a5c1e
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -406,6 +406,13 @@ void bt_t::play(bt_move_t _m) {
}
int bt_t::endgame() {
if (nb_black_pieces == 0) {
return WHITE;
}
if (nb_white_pieces == 0) {
return BLACK;
}
for (int i = 0; i < nbc; i++) {
if (board[0][i] == WHITE) {
return WHITE;