});
if (epSqs.length == 0)
return moves;
- const oppCol = this.getOppCol(color);
+ const oppCol = V.GetOppCol(color);
for (let sq of epSqs)
{
if (this.subTurn == 1 || (epSqs.length == 2 &&
this.epSquares.push([epSq]);
}
// Does this move give check on subturn 1? If yes, skip subturn 2
- else if (this.subTurn==1 && this.underCheck(this.getOppCol(this.turn)))
+ else if (this.subTurn==1 && this.underCheck(V.GetOppCol(this.turn)))
{
- this.turn = this.getOppCol(this.turn);
+ this.turn = V.GetOppCol(this.turn);
this.epSquares.push([epSq]);
move.checkOnSubturn1 = true;
}
{
if (this.subTurn == 2)
{
- this.turn = this.getOppCol(this.turn);
+ this.turn = V.GetOppCol(this.turn);
let lastEpsq = this.epSquares[this.epSquares.length-1];
lastEpsq.push(epSq);
}
}
else if (move.checkOnSubturn1)
{
- this.turn = this.getOppCol(this.turn);
+ this.turn = V.GetOppCol(this.turn);
this.subTurn = 1;
this.epSquares.pop();
}
{
if (this.subTurn == 1)
{
- this.turn = this.getOppCol(this.turn);
+ this.turn = V.GetOppCol(this.turn);
let lastEpsq = this.epSquares[this.epSquares.length-1];
lastEpsq.pop();
}
const maxeval = V.INFINITY;
const color = this.turn;
- const oppCol = this.getOppCol(this.turn);
+ const oppCol = V.GetOppCol(this.turn);
// Search best (half) move for opponent turn
const getBestMoveEval = () => {