Actualiser src/backend/Simulator.java

This commit is contained in:
Balthazar SQUINABOL 2024-04-10 15:42:12 +02:00
parent 0a534715b8
commit 523bf7d0cb
1 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,7 @@ public class Simulator extends Thread {
private int loopDelay = 150; private int loopDelay = 150;
//TODO : add missing attribute(s) //TODO : add missing attribute(s)
private double randomDansitySlider = 0.5;
private int width; private int width;
private int height; private int height;
private boolean enableLogs; private boolean enableLogs;
@ -316,6 +317,13 @@ public class Simulator extends Thread {
System.out.println("Loop delay set to " + delay); System.out.println("Loop delay set to " + delay);
} }
} }
public void setDansity(double density) {
randomDansitySlider = density;
if (enableLogs) {
System.out.println("Density set to " + density);
}
}
public void toggleClickAction() { public void toggleClickAction() {
//TODO-COMPLETE : complete method //TODO-COMPLETE : complete method