- let lastEpsq = this.epSquares[this.epSquares.length-1];
- const epSq = this.getEpSquare(move);
- if (lastEpsq.length == 1)
- lastEpsq.push(epSq);
- else
- {
- // New turn
- let newEpsqs = [epSq];
- if (this.startAtFirstMove && this.moves.length == 0)
- newEpsqs.push(undefined); //at first move, to force length==2 (TODO)
- this.epSquares.push(newEpsqs);
- }