refactor main method signature and enhance config initialization

This commit is contained in:
2025-12-15 21:44:50 +01:00
parent 93467760db
commit 2cda920e15
4 changed files with 6 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ public class Boot {
}
}
static void main() {
public static void main(String[] args) {
generateWindow();
gamePanel.setupGame();

View File

@@ -10,9 +10,11 @@ public class Config {
private final GamePanel panel;
private final HashMap<String, String> settings = new HashMap<>();
public Config(GamePanel panel) {
public Config(GamePanel panel) throws IOException {
this.panel = panel;
for (Setting option : Setting.values()) settings.put(option.name, null);
new File("gamedata").mkdirs();
new File("gamedata/config").createNewFile();
}
// GENERAL

View File

@@ -3,7 +3,7 @@ package de.miaurizius.jgame2d.core.enums;
public enum Map {
OVERWORLD("worldmap", 0),
HUT("worldmap", 1);
HUT("indoor01", 1);
private final String name;
private final int index;