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()];
|
||||
|
||||
|
||||
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
|
||||
|
|
@ -138,22 +149,16 @@ public class Simulator extends Thread {
|
|||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue