Exemplo n.º 1
0
  public void generateMap() {
    Random random = new Random();
    for (int i = 0; i < 50; i++) {
      cellList.add(
          new Cell(
              new Point(
                  random.nextInt(Genetic_Labour.MAXIMUM_X_POSITION),
                  random.nextInt(Genetic_Labour.MAXIMUM_Y_POSITION)),
              random.nextInt(CELL_MAXIMUM_SIZE - 4) + 4));
    }

    calculateFitness();
  }
Exemplo n.º 2
0
 public void setCellList(ArrayList<Cell> cellList) {
   this.cellList = cellList;
   calculateFitness();
 }