Adjust auto play selection.

This commit is contained in:
yukirij 2024-08-20 17:22:42 -07:00
parent 655ec28e14
commit 87693291f3

View File

@ -1085,13 +1085,13 @@ const INTERFACE = {
// Select random from ties.
let selection = 0;
for(let i = 1; i < moves.length; ++i) {
if(moves[i].score == moves[i-1].score) {
if(moves[i].score + 10 >= moves[i-1].score) {
selection++;
} else {
break;
}
}
selection = Math.min(moves.length, selection + 2);
selection = Math.min(moves.length, selection + 1);
return moves[Math.floor(Math.random() * selection)];
}