updated reset
This commit is contained in:
parent
0cfe8fc9b5
commit
b8b1b0cc93
|
|
@ -588,6 +588,10 @@ public class Simulator extends Thread {
|
||||||
for (int i = 0; i < getHeight(); i++) {
|
for (int i = 0; i < getHeight(); i++) {
|
||||||
for (int j = 0 ; j < getWidth() ; j++) {
|
for (int j = 0 ; j < getWidth() ; j++) {
|
||||||
setCell(i,j,0);
|
setCell(i,j,0);
|
||||||
|
ArrayList<Agent> nearby = getNeighboringAnimals(i, j, 1);
|
||||||
|
for (Agent animal:nearby) {
|
||||||
|
agents.remove(animal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.stepCount = 0;
|
this.stepCount = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue