static IsGoodEnpassant(enpassant) {
    if (enpassant != "-") {
      const ep = V.SquareToCoords(enpassant);
      if (isNaN(ep.x) || !V.OnBoard(ep)) return false;
    }
    return true;
  }
// NOTE: not with regexp to adapt to different board sizes. (TODO?)
not with regexp to adapt to different board sizes.
not with regexp to adapt to different board sizes .
static IsGoodEnpassant(enpassant) {
    if (enpassant != "-") {
      const ep = V.SquareToCoords(enpassant);
      if (isNaN(ep.x) || !V.OnBoard(ep)) return false;
    }
    return true;
  }
static IsGoodEnpassant ( enpassant ) { if ( enpassant != "-" ) { const ep = V . SquareToCoords ( enpassant ) ; if ( isNaN ( ep . x ) || ! V . OnBoard ( ep ) ) return false ; } return true ; }
NOTE: not with regexp to adapt to different board sizes.
NOTE : not with regexp to adapt to different board sizes .