rien
This commit is contained in:
parent
8ac8a92d0e
commit
ae82901690
|
|
@ -122,7 +122,18 @@ public class Simulator extends Thread {
|
||||||
|
|
||||||
int[][] newWorld = new int[getWidth()][getHeight()];
|
int[][] newWorld = new int[getWidth()][getHeight()];
|
||||||
|
|
||||||
|
ArrayList<Agent> newAgents = new ArrayList<>();
|
||||||
|
for(Agent agent : agents) {
|
||||||
|
ArrayList<Agent> neighbors =
|
||||||
|
this.getNeighboringAnimals(
|
||||||
|
agent.getX(),
|
||||||
|
agent.getY(),
|
||||||
|
ANIMAL_AREA_RADIUS);}
|
||||||
|
//if(!agent.liveTurn(
|
||||||
|
// neighbors,
|
||||||
|
// this)) {
|
||||||
|
// agents.remove(agent);
|
||||||
|
//{
|
||||||
|
|
||||||
|
|
||||||
// Apply Game of Life rules
|
// Apply Game of Life rules
|
||||||
|
|
@ -136,24 +147,18 @@ public class Simulator extends Thread {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
world = newWorld;
|
world = newWorld;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ArrayList<Agent> newAgents = new ArrayList<>();
|
|
||||||
for(Agent agent : agents) {
|
|
||||||
ArrayList<Agent> neighbors =
|
|
||||||
this.getNeighboringAnimals(
|
|
||||||
agent.getX(),
|
|
||||||
agent.getY(),
|
|
||||||
ANIMAL_AREA_RADIUS);}
|
|
||||||
//if(!agent.liveTurn(
|
|
||||||
// neighbors,
|
|
||||||
// this)) {
|
|
||||||
// agents.remove(agent);
|
|
||||||
//{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//then evolution of the field
|
//then evolution of the field
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue