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