Initializing with conway
This commit is contained in:
parent
82bcd85852
commit
8c93942fb6
|
|
@ -29,7 +29,8 @@ public class Simulator extends Thread {
|
|||
private boolean loopingBorder;
|
||||
private boolean clickActionFlag;
|
||||
private int loopDelay = 150;
|
||||
private ArrayList<Integer> ruleSurviveCriteria= new ArrayList<Integer>() ;
|
||||
private ArrayList<Integer> ruleSurviveCriteria= new ArrayList<Integer>();
|
||||
|
||||
private ArrayList<Integer> ruleBirthCriteria=new ArrayList<Integer>() ;
|
||||
//Rules rule = new Rules();
|
||||
//TODO : add missing attribute(s)
|
||||
|
|
@ -49,6 +50,9 @@ public class Simulator extends Thread {
|
|||
|
||||
//TODO : add missing attribute initialization
|
||||
|
||||
ruleSurviveCriteria.add(2);//initializing system with conway rule
|
||||
ruleSurviveCriteria.add(3);
|
||||
ruleBirthCriteria.add(3);
|
||||
//initialize grid with dead cells
|
||||
for(int x=0; x < getWidth();x++) {
|
||||
ArrayList<Cell> arrayCell = new ArrayList<Cell>(); //initialize first dimension with ArrayLists
|
||||
|
|
|
|||
Loading…
Reference in New Issue