added variables
This commit is contained in:
parent
6940c9df65
commit
226c20f1c6
|
|
@ -1,3 +1,8 @@
|
|||
When starting a task "TODO" edit it to "TODO-INPROGRESS"
|
||||
When task is done edit it to "TODO-COMPLETE"
|
||||
If there is an error in the code edit it to "TODO-ERROR"
|
||||
|
||||
|
||||
Reminder of game of life rules:
|
||||
1. Any living cell with strictly fewer than two living neighbors dies (referred to
|
||||
as underpopulation or exposure).
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ public class Simulator extends Thread {
|
|||
private int loopDelay = 150;
|
||||
|
||||
//TODO : add missing attribute(s)
|
||||
private int width;
|
||||
private int height;
|
||||
|
||||
public Simulator(MyInterface mjfParam) {
|
||||
mjf = mjfParam;
|
||||
|
|
@ -38,8 +40,10 @@ public class Simulator extends Thread {
|
|||
fieldBirthValues = new ArrayList<Integer>();
|
||||
fieldSurviveValues = new ArrayList<Integer>();
|
||||
|
||||
//TODO : add missing attribute initialization
|
||||
|
||||
//TODO-COMPLETE: add missing attribute initialization
|
||||
//might want to changes those values later
|
||||
this.width=100;
|
||||
this.height=100;
|
||||
|
||||
|
||||
//Default rule : Survive always, birth never
|
||||
|
|
@ -50,13 +54,13 @@ public class Simulator extends Thread {
|
|||
}
|
||||
|
||||
public int getWidth() {
|
||||
//TODO : replace with proper return
|
||||
return 0;
|
||||
//TODO-COMPLETE : replace with proper return
|
||||
return this.width;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
//TODO : replace with proper return
|
||||
return 0;
|
||||
//TODO-COMPLETE : replace with proper return
|
||||
return this.height;
|
||||
}
|
||||
|
||||
//Should probably stay as is
|
||||
|
|
|
|||
Loading…
Reference in New Issue