fix le code du prof
This commit is contained in:
parent
cedc53cfab
commit
9a160a5c1e
1 changed files with 7 additions and 0 deletions
|
@ -406,6 +406,13 @@ void bt_t::play(bt_move_t _m) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int bt_t::endgame() {
|
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++) {
|
for (int i = 0; i < nbc; i++) {
|
||||||
if (board[0][i] == WHITE) {
|
if (board[0][i] == WHITE) {
|
||||||
return WHITE;
|
return WHITE;
|
||||||
|
|
Reference in a new issue