postPlay(move) {
    const c = V.GetOppCol(this.turn);
    let piece = undefined;
    if (move.vanish.length >= 1)
      // Usual case, something is moved
      piece = move.vanish[0].p;
    else
      // Crazyhouse-like variants
      piece = move.appear[0].p;

    // Update king position + flags
    if (piece == V.KING && move.appear.length > 0)
      this.kingPos[c] = [move.appear[0].x, move.appear[0].y];
    if (V.HasCastle) this.updateCastleFlags(move, piece);
  }
// After move is played, update variables + flags
After move is played, update variables + flags
After move is played update variables + flags
postPlay(move) {
    const c = V.GetOppCol(this.turn);
    let piece = undefined;
    if (move.vanish.length >= 1)
      piece = move.vanish[0].p;
    else
      piece = move.appear[0].p;
    if (piece == V.KING && move.appear.length > 0)
      this.kingPos[c] = [move.appear[0].x, move.appear[0].y];
    if (V.HasCastle) this.updateCastleFlags(move, piece);
  }
postPlay ( move ) { const c = V . GetOppCol ( this . turn ) ; let piece = undefined ; if ( move . vanish . length >= 1 ) piece = move . vanish [ 0 ] . p ; else piece = move . appear [ 0 ] . p ; if ( piece == V . KING && move . appear . length > 0 ) this . kingPos [ c ] = [ move . appear [ 0 ] . x , move . appear [ 0 ] . y ] ; if ( V . HasCastle ) this . updateCastleFlags ( move , piece ) ; }
After move is played, update variables + flags
After move is played update variables + flags
// Usual case, something is moved // Crazyhouse-like variants // Update king position + flags