Contol Windwo Update. Velocity Change implemented. FONT and some other Var and method needs to be implemented in the GUI class not in Menu Window

This commit is contained in:
Noah
2021-10-06 10:32:16 +02:00
parent 546e5cbfc0
commit 96404f1d26
5 changed files with 123 additions and 14 deletions
+9 -3
View File
@@ -9,7 +9,7 @@ public class Control {
private GUI gui;
private Clock clock;
private int xSize, ySize, cellCount, gen = 0;
private int xSize, ySize, cellCount, gen;
private boolean[][] cells;
private boolean[][] newcells;
@@ -22,14 +22,14 @@ public class Control {
public void start() {
clock = new Clock();
clock = new Clock(this, gui, 1000);
gui = new GUI(this);
gui.createMenuWindow();
}
public void startGame() {
clock.start(this, gui, 200);
clock.start();
}
public void buildGameWindow(int xSize, int ySize, int cellCount, StartMode startMode) {
@@ -37,6 +37,8 @@ public class Control {
this.ySize = ySize;
this.cellCount = cellCount;
gen = 0;
cells = new boolean[this.xSize][this.ySize];
newcells = new boolean[this.xSize][this.ySize];
@@ -279,6 +281,10 @@ public class Control {
public boolean isRunning(){
return clock.isRunning();
}
public void setVelocity(int velocity){
clock.setVelocity(velocity);
}
}