doClick(square) {
    const c = this.turn;
    if (
      this.movesCount >= 2 ||
      (
        (c == 'w' && square[0] != 7) ||
        (c == 'b' && square[0] != 0)
      )
    ) {
      return null;
    }
    return new Move({
      appear: [
        new PiPo({ x: square[0], y: square[1], c: c, p: V.KING })
      ],
      vanish: [
        new PiPo({ x: square[0], y: square[1], c: c, p: V.UNDEFINED })
      ],
      start: { x: -1, y: -1 }
    });
  }
// Initiate the game by choosing a square for the king:
Initiate the game by choosing a square for the king.
Initiate the game by choosing a square for the king .
doClick(square) {
    const c = this.turn;
    if (
      this.movesCount >= 2 ||
      (
        (c == 'w' && square[0] != 7) ||
        (c == 'b' && square[0] != 0)
      )
    ) {
      return null;
    }
    return new Move({
      appear: [
        new PiPo({ x: square[0], y: square[1], c: c, p: V.KING })
      ],
      vanish: [
        new PiPo({ x: square[0], y: square[1], c: c, p: V.UNDEFINED })
      ],
      start: { x: -1, y: -1 }
    });
  }
doClick ( square ) { const c = this . turn ; if ( this . movesCount >= 2 || ( ( c == 'w' && square [ 0 ] != 7 ) || ( c == 'b' && square [ 0 ] != 0 ) ) ) { return null ; } return new Move ( { appear : [ new PiPo ( { x : square [ 0 ] , y : square [ 1 ] , c : c , p : V . KING } ) ] , vanish : [ new PiPo ( { x : square [ 0 ] , y : square [ 1 ] , c : c , p : V . UNDEFINED } ) ] , start : { x : - 1 , y : - 1 } } ) ; }
Initiate the game by choosing a square for the king:
Initiate the game by choosing a square for the king :