Adjust auto play selection.
This commit is contained in:
parent
655ec28e14
commit
87693291f3
@ -1085,13 +1085,13 @@ const INTERFACE = {
|
|||||||
// Select random from ties.
|
// Select random from ties.
|
||||||
let selection = 0;
|
let selection = 0;
|
||||||
for(let i = 1; i < moves.length; ++i) {
|
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++;
|
selection++;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
selection = Math.min(moves.length, selection + 2);
|
selection = Math.min(moves.length, selection + 1);
|
||||||
|
|
||||||
return moves[Math.floor(Math.random() * selection)];
|
return moves[Math.floor(Math.random() * selection)];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user