ON FIX ENCORE LE CODE DU PROF
This commit is contained in:
parent
2d4c6c1cf9
commit
07a38b5c2b
1 changed files with 8 additions and 2 deletions
|
@ -246,8 +246,14 @@ bool bt_t::mcts_simulation(void) {
|
||||||
|
|
||||||
// then play randomly 'til the game is over
|
// then play randomly 'til the game is over
|
||||||
while (endgame() == EMPTY) {
|
while (endgame() == EMPTY) {
|
||||||
bt_move_t m = get_rand_move();
|
update_moves();
|
||||||
|
if (nb_moves > 0) {
|
||||||
|
int r = (static_cast<int>(rand())) % nb_moves;
|
||||||
|
bt_move_t m = moves[r];
|
||||||
play(m);
|
play(m);
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if i won
|
// if i won
|
||||||
|
|
Reference in a new issue