atLeastOneMove() {
    const color = this.turn;
    for (let i = 0; i < V.size.x; i++) {
      for (let j = 0; j < V.size.y; j++) {
        if (this.board[i][j] != V.EMPTY && this.getColor(i, j) == color) {
          if (this.getPotentialMovesFrom([i, j]).length > 0) return true;
        }
      }
    }
    return false;
  }
// Stop at the first move found
Stop at the first move found
Stop at the first move found
atLeastOneMove() {
    const color = this.turn;
    for (let i = 0; i < V.size.x; i++) {
      for (let j = 0; j < V.size.y; j++) {
        if (this.board[i][j] != V.EMPTY && this.getColor(i, j) == color) {
          if (this.getPotentialMovesFrom([i, j]).length > 0) return true;
        }
      }
    }
    return false;
  }
atLeastOneMove ( ) { const color = this . turn ; for ( let i = 0 ; i < V . size . x ; i ++ ) { for ( let j = 0 ; j < V . size . y ; j ++ ) { if ( this . board [ i ] [ j ] != V . EMPTY && this . getColor ( i , j ) == color ) { if ( this . getPotentialMovesFrom ( [ i , j ] ) . length > 0 ) return true ; } } } return false ; }
Stop at the first move found
Stop at the first move found