diff --git a/src/backend/Simulator.java b/src/backend/Simulator.java index c8e86df..bd12141 100644 --- a/src/backend/Simulator.java +++ b/src/backend/Simulator.java @@ -122,7 +122,18 @@ public class Simulator extends Thread { int[][] newWorld = new int[getWidth()][getHeight()]; - + ArrayList newAgents = new ArrayList<>(); + for(Agent agent : agents) { + ArrayList neighbors = + this.getNeighboringAnimals( + agent.getX(), + agent.getY(), + ANIMAL_AREA_RADIUS);} + //if(!agent.liveTurn( + // neighbors, + // this)) { + // agents.remove(agent); + //{ // Apply Game of Life rules @@ -136,24 +147,18 @@ public class Simulator extends Thread { // } // } //} + + + + + world = newWorld; - ArrayList newAgents = new ArrayList<>(); - for(Agent agent : agents) { - ArrayList neighbors = - this.getNeighboringAnimals( - agent.getX(), - agent.getY(), - ANIMAL_AREA_RADIUS);} - //if(!agent.liveTurn( - // neighbors, - // this)) { - // agents.remove(agent); - //{ + } //then evolution of the field