atLeastOneCapture() {
    const xBounds = this.turn == 'w' ? [4,7] : [0,3];
    for (let i = xBounds[0]; i <= xBounds[1]; i++) {
      for (let j = 0; j < V.size.y; j++) {
        if (
          this.board[i][j] != V.EMPTY &&
          this.getPotentialMovesFrom([i, j]).some(m => m.vanish.length == 2)
        ) {
          return true;
        }
      }
    }
    return false;
  }
// Stop at the first capture found (if any)
Stop at the first capture found (if any)
Stop at the first capture found ( if any )
atLeastOneCapture() {
    const xBounds = this.turn == 'w' ? [4,7] : [0,3];
    for (let i = xBounds[0]; i <= xBounds[1]; i++) {
      for (let j = 0; j < V.size.y; j++) {
        if (
          this.board[i][j] != V.EMPTY &&
          this.getPotentialMovesFrom([i, j]).some(m => m.vanish.length == 2)
        ) {
          return true;
        }
      }
    }
    return false;
  }
atLeastOneCapture ( ) { const xBounds = this . turn == 'w' ? [ 4 , 7 ] : [ 0 , 3 ] ; for ( let i = xBounds [ 0 ] ; i <= xBounds [ 1 ] ; i ++ ) { for ( let j = 0 ; j < V . size . y ; j ++ ) { if ( this . board [ i ] [ j ] != V . EMPTY && this . getPotentialMovesFrom ( [ i , j ] ) . some ( m => m . vanish . length == 2 ) ) { return true ; } } } return false ; }
Stop at the first capture found (if any)
Stop at the first capture found ( if any )