doClick(square) {
    if (this.movesCount >= 4) return null;
    const color = this.turn;
    const [x, y] = [square[0], square[1]];
    if ((color == 'w' && x != 7) || (color == 'b' && x != 0)) return null;
    const selectedPiece = this.board[x][y][1];
    // Prevent re-augmenting a chosen piece:
    if (!ChessRules.PIECES.includes(selectedPiece)) return null;
    return new Move({
      appear: [
        new PiPo({
          x: x,
          y: y,
          c: color,
          p: this.getAugmented(selectedPiece)
        })
      ],
      vanish: [
        new PiPo({
          x: x,
          y: y,
          c: color,
          p: selectedPiece
        })
      ],
      start: { x: x, y: y },
      end: { x: x, y: y }
    });
  }
// Special case of move 1 = choose squares, knight first, then bishop
Special case of move 1 = choose squares, knight first, then bishop
Special case of move 1 = choose squares knight first then bishop
doClick(square) {
    if (this.movesCount >= 4) return null;
    const color = this.turn;
    const [x, y] = [square[0], square[1]];
    if ((color == 'w' && x != 7) || (color == 'b' && x != 0)) return null;
    const selectedPiece = this.board[x][y][1];
    if (!ChessRules.PIECES.includes(selectedPiece)) return null;
    return new Move({
      appear: [
        new PiPo({
          x: x,
          y: y,
          c: color,
          p: this.getAugmented(selectedPiece)
        })
      ],
      vanish: [
        new PiPo({
          x: x,
          y: y,
          c: color,
          p: selectedPiece
        })
      ],
      start: { x: x, y: y },
      end: { x: x, y: y }
    });
  }
doClick ( square ) { if ( this . movesCount >= 4 ) return null ; const color = this . turn ; const [ x , y ] = [ square [ 0 ] , square [ 1 ] ] ; if ( ( color == 'w' && x != 7 ) || ( color == 'b' && x != 0 ) ) return null ; const selectedPiece = this . board [ x ] [ y ] [ 1 ] ; if ( ! ChessRules . PIECES . includes ( selectedPiece ) ) return null ; return new Move ( { appear : [ new PiPo ( { x : x , y : y , c : color , p : this . getAugmented ( selectedPiece ) } ) ] , vanish : [ new PiPo ( { x : x , y : y , c : color , p : selectedPiece } ) ] , start : { x : x , y : y } , end : { x : x , y : y } } ) ; }
Special case of move 1 = choose squares, knight first, then bishop
Special case of move 1 = choose squares knight first then bishop
// Prevent re-augmenting a chosen piece: