try make step agent
This commit is contained in:
parent
68f4106a43
commit
73662f1c0c
|
|
@ -158,18 +158,12 @@ public class Simulator extends Thread {
|
|||
// in agent classes
|
||||
|
||||
|
||||
/*ArrayList<Agent> newAgents = new ArrayList<>();
|
||||
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)) {
|
||||
ArrayList<Agent> neighbors =this.getNeighboringAnimals(agent.getX(),agent.getY(),ANIMAL_AREA_RADIUS);}
|
||||
if(!agent.liveTurn(neighbors,this)) {
|
||||
agents.remove(agent);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
int[][] nextWorld = new int[getWidth()][getHeight()];
|
||||
|
|
|
|||
Loading…
Reference in New Issue