until getCell modif
This commit is contained in:
parent
c262f9fa37
commit
e57c3e77a1
|
|
@ -24,7 +24,7 @@ public class Simulator extends Thread {
|
||||||
private boolean loopingBorder;
|
private boolean loopingBorder;
|
||||||
private boolean clickActionFlag;
|
private boolean clickActionFlag;
|
||||||
private int loopDelay = 150;
|
private int loopDelay = 150;
|
||||||
|
|
||||||
//TODO : add missing attribute(s)
|
//TODO : add missing attribute(s)
|
||||||
|
|
||||||
public Simulator(MyInterface mjfParam) {
|
public Simulator(MyInterface mjfParam) {
|
||||||
|
|
@ -50,13 +50,11 @@ public class Simulator extends Thread {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
//TODO : replace with proper return
|
return COL_NUM;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
//TODO : replace with proper return
|
return LINE_NUM;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Should probably stay as is
|
//Should probably stay as is
|
||||||
|
|
@ -136,6 +134,8 @@ public class Simulator extends Thread {
|
||||||
* method called when clicking pause button
|
* method called when clicking pause button
|
||||||
*/
|
*/
|
||||||
public void togglePause() {
|
public void togglePause() {
|
||||||
|
pauseFlag = !pauseFlag ;
|
||||||
|
|
||||||
// TODO : actually toggle the corresponding flag
|
// TODO : actually toggle the corresponding flag
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,8 +153,8 @@ public class Simulator extends Thread {
|
||||||
* @return value of cell
|
* @return value of cell
|
||||||
*/
|
*/
|
||||||
public int getCell(int x, int y) {
|
public int getCell(int x, int y) {
|
||||||
//TODO : complete method with proper return
|
|
||||||
return 0;
|
return
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -252,17 +252,18 @@ public class Simulator extends Thread {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLoopingBorder() {
|
public boolean isLoopingBorder() {
|
||||||
//TODO : complete method with proper return
|
|
||||||
return false;
|
return loopingBorder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleLoopingBorder() {
|
public void toggleLoopingBorder() { //MODIFIED
|
||||||
//TODO : complete method
|
loopingBorder =! loopingBorder;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoopDelay(int delay) {
|
public void setLoopDelay(int delay) {
|
||||||
//TODO : complete method
|
delay = loopDelay;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleClickAction() {
|
public void toggleClickAction() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue