6 first methods complete + grid variable creation

This commit is contained in:
yoyom 2024-05-07 15:17:32 +02:00
parent e360073102
commit 27789202b3
1 changed files with 8 additions and 11 deletions

View File

@ -24,8 +24,9 @@ public class Simulator extends Thread {
private boolean loopingBorder;
private boolean clickActionFlag;
private int loopDelay = 150;
private int[][] grid;
//TODO : add missing attribute(s) test
//TODO : add missing attribute(s)
public Simulator(MyInterface mjfParam) {
mjf = mjfParam;
@ -50,13 +51,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,7 +135,7 @@ public class Simulator extends Thread {
* method called when clicking pause button
*/
public void togglePause() {
// TODO : actually toggle the corresponding flag
pauseFlag = !pauseFlag;
}
/**
@ -252,17 +251,15 @@ public class Simulator extends Thread {
}
public boolean isLoopingBorder() {
//TODO : complete method with proper return
return false;
return loopingBorder;
}
public void toggleLoopingBorder() {
//TODO : complete method
loopingBorder = !loopingBorder;
}
public void setLoopDelay(int delay) {
//TODO : complete method
loopDelay = delay;
}
public void toggleClickAction() {