// No alpha-beta here, just adapted min-max at depth 2(+1)
getComputerMove()
{
+ if (this.subTurn == 2)
+ return null; //TODO: imperfect interface setup
+
const maxeval = V.INFINITY;
const color = this.turn;
const oppCol = this.getOppCol(this.turn);
{
candidates.push(i);
}
+
const selected = doubleMoves[_.sample(candidates, 1)].moves;
if (selected.length == 1)
return selected[0];