New Projekt Stukture

This commit is contained in:
Noah
2021-10-02 17:15:49 +02:00
parent d2ab1ba1d7
commit 0c09667677
8 changed files with 465 additions and 454 deletions
+14 -9
View File
@@ -2,6 +2,7 @@ package game;
import gui.GUI;
import java.util.concurrent.ThreadLocalRandom;
public class Control {
@@ -21,13 +22,13 @@ public class Control {
public void start() {
gui = new GUI(this);
gui.controlWindow();
gui.createMenuWindow();
}
public void startGame() {
clock = new Clock();
clock.start(this, gui);
clock.start(this, gui, 2000);
}
public void buildGameWindow(int xSize, int ySize, int cellCount, StartMode startMode) {
@@ -57,20 +58,20 @@ public class Control {
gui = new GUI(this);
}
if (startMode == StartMode.Manuel){
gui.manuelGameWindow(this.xSize, this.ySize);
} else {
gui.gameWindow(this.xSize, this.ySize);
}
gui.createGameWindow(this.xSize, this.ySize);
// startGame();
startGame();
}
private void buildManuelGame() {
for (int x = 0; x < xSize; x++) {
for (int y = 0; y < ySize; y++) {
cells[x][y] = false;
}
}
}
@@ -233,6 +234,10 @@ public class Control {
showGrid(cells);
}
public void createControlWindow() {
gui.createControlWindow();
}
}