生命游戏-JAVA语言代码-细胞自动机-毕业论文 联系客服

发布时间 : 星期五 文章生命游戏-JAVA语言代码-细胞自动机-毕业论文更新完毕开始阅读2c24c0c77f1922791688e85b

浙江理工大学本科毕业设计(论文)

public int getCondition() { }

public void setCondition(int condition) { }

public int getReproduceState() { }

public void setReproduceState(int reproduceState) { }

public int getX() { }

public void setX(int x) { }

public int getY() { }

31

}

public double getAdulthoodAge() { }

public void setAdulthoodAge(int adulthoodAge) { }

this.adulthoodAge = adulthoodAge; return adulthoodAge;

return condition;

this.condition = condition;

return reproduceState;

this.reproduceState = reproduceState;

return x;

this.x = x;

return y;

生命游戏的计算机模拟以及参数对运行结果的分析

}

public void setY(int y) { }

public double getFoodCondition() { }

public void setFoodCondition(double foodCondition) { }

public double getReproduceblank() { }

public void setReproduceblank(double reproduceblank) { }

this.reproduceblank = reproduceblank; return reproduceblank;

this.foodCondition = foodCondition; return foodCondition; this.y = y;

2.地形单位类

package com.apei.lifegame.model.condition;

import java.util.ArrayList; import java.util.Collections; import java.util.List;

import com.apei.lifegame.model.organism.Organism;

public class GroundUnit {

private int x = 0; private int y = 0;

private int groundType = 0;

32

浙江理工大学本科毕业设计(论文)

public void get(int num) {

33

private int groundLevel = 0;

private double percent;

private List organisms = new ArrayList();

private List tempKillList = new ArrayList();

public GroundUnit() { }

super();

public GroundUnit(String[] str) { }

lineToUnit(str);

public GroundUnit(int x, int y, int groundType, int groundLevel) { }

super(); this.x = x; this.y = y;

this.groundType = groundType; this.groundLevel = groundLevel;

public void add(Organism organism) { }

organisms.add(organism);

生命游戏的计算机模拟以及参数对运行结果的分析

public double getSumPlantNeed() {

double sumPlant = 0;

for (Organism organism : organisms) { }

// System.out.println(\return sumPlant;

34

}

organisms.get(num);

// 获得总竞争力

public double getSumCompetitiveness() { }

double sumC = 0;

for (Organism organism : organisms) { }

return sumC;

sumC += organism.getCompetitivenessByGround(this);

public double getSumPlant() { }

if (groundType == 1) {

return percent;

} else if (groundType == 2) {

return percent + 1.0;

} else { }

return 0;

sumPlant += organism.getPlantNeeded();