示例#1
0
文件: Map.java 项目: amazinq/Genetic
  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();
  }
示例#2
0
文件: Map.java 项目: amazinq/Genetic
 public void setCellList(ArrayList<Cell> cellList) {
   this.cellList = cellList;
   calculateFitness();
 }