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 clickActionFlag;
|
||||
private int loopDelay = 150;
|
||||
|
||||
|
||||
//TODO : add missing attribute(s)
|
||||
|
||||
public Simulator(MyInterface mjfParam) {
|
||||
|
|
@ -50,13 +50,11 @@ public class Simulator extends Thread {
|
|||
}
|
||||
|
||||
public int getWidth() {
|
||||
//TODO : replace with proper return
|
||||
return 0;
|
||||
return COL_NUM;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
//TODO : replace with proper return
|
||||
return 0;
|
||||
return LINE_NUM;
|
||||
}
|
||||
|
||||
//Should probably stay as is
|
||||
|
|
@ -136,6 +134,8 @@ public class Simulator extends Thread {
|
|||
* method called when clicking pause button
|
||||
*/
|
||||
public void togglePause() {
|
||||
pauseFlag = !pauseFlag ;
|
||||
|
||||
// TODO : actually toggle the corresponding flag
|
||||
}
|
||||
|
||||
|
|
@ -153,8 +153,8 @@ public class Simulator extends Thread {
|
|||
* @return value of cell
|
||||
*/
|
||||
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() {
|
||||
//TODO : complete method with proper return
|
||||
return false;
|
||||
|
||||
return loopingBorder;
|
||||
}
|
||||
|
||||
public void toggleLoopingBorder() {
|
||||
//TODO : complete method
|
||||
public void toggleLoopingBorder() { //MODIFIED
|
||||
loopingBorder =! loopingBorder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setLoopDelay(int delay) {
|
||||
//TODO : complete method
|
||||
delay = loopDelay;
|
||||
}
|
||||
|
||||
public void toggleClickAction() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue