Merge branch 'master' of https://gitarero.ecam.fr/laure.bel/OOP_F3_Project.git
This commit is contained in:
commit
167f10a913
|
|
@ -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