Compare commits

...

2 Commits

Author SHA1 Message Date
l.dupuis-burtin a60c16d748 Merge branch 'master' of
https://gitarero.ecam.fr/raphael.savio/OOP_E4_Project.git
2024-04-10 16:51:59 +02:00
l.dupuis-burtin 76939402e5 cells arrayList 2024-04-10 16:43:44 +02:00
1 changed files with 7 additions and 2 deletions

View File

@ -12,13 +12,13 @@ public class Simulator extends Thread {
private final int LIFE_TYPE_NUM = 4; private final int LIFE_TYPE_NUM = 4;
//Conway Radius : 1 //Conway Radius : 1
private final int LIFE_AREA_RADIUS = 1; private final int LIFE_AREA_RADIUS = 1;
//Animal Neighborhood Radius : 5 //Animal Neighborhood Radius : 2
private final int ANIMAL_AREA_RADIUS = 2; private final int ANIMAL_AREA_RADIUS = 2;
private ArrayList<Integer> fieldSurviveValues; private ArrayList<Integer> fieldSurviveValues;
private ArrayList<Integer> fieldBirthValues; private ArrayList<Integer> fieldBirthValues;
private ArrayList<Agent> agents; private ArrayList<Agent> agents;
private ArrayList<Cell> cells;
private boolean stopFlag; private boolean stopFlag;
private boolean pauseFlag; private boolean pauseFlag;
private boolean loopingBorder; private boolean loopingBorder;
@ -33,6 +33,7 @@ public class Simulator extends Thread {
pauseFlag=false; pauseFlag=false;
loopingBorder=false; loopingBorder=false;
clickActionFlag=false; clickActionFlag=false;
cells = new ArrayList<Cell>();
agents = new ArrayList<Agent>(); agents = new ArrayList<Agent>();
fieldBirthValues = new ArrayList<Integer>(); fieldBirthValues = new ArrayList<Integer>();
fieldSurviveValues = new ArrayList<Integer>(); fieldSurviveValues = new ArrayList<Integer>();
@ -267,6 +268,9 @@ public class Simulator extends Thread {
public void setLoopDelay(int delay) { public void setLoopDelay(int delay) {
//TODO : complete method //TODO : complete method
<<<<<<< HEAD
loopDelay=delay;
=======
// this.loopDelay = delay; // this.loopDelay = delay;
// if (pauseFlag) { // if (pauseFlag) {
// return; // return;
@ -278,6 +282,7 @@ public class Simulator extends Thread {
// Thread.currentThread().interrupt(); // Restore interrupted status. // Thread.currentThread().interrupt(); // Restore interrupted status.
// System.err.println("Simulation step was interrupted."); // System.err.println("Simulation step was interrupted.");
// } // }
>>>>>>> branch 'master' of https://gitarero.ecam.fr/raphael.savio/OOP_E4_Project.git
} }
public void toggleClickAction() { public void toggleClickAction() {