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

@@ -23,7 +23,7 @@
18 18 18 18 18 18 18 24 16 16 1 16 16 1 14 5 5 5 5 5 5 5 6 3 4 5 5 5 5 15 16 16 16 14 5 6 3 7 2 23 18 18 19 18 18 18 18 18 18 18
18 18 18 18 18 18 18 30 22 16 1 16 16 1 16 16 16 16 16 16 16 1 8 3 7 1 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 18 18 18 18
18 18 18 18 18 18 18 18 24 16 1 16 16 1 16 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 18 18 18 18
18 18 18 18 18 18 18 18 27 16 1 16 16 1 1 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 19 18 18 18
18 18 18 18 18 18 18 28 27 16 1 16 16 1 1 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 19 18 18 18
18 18 18 19 18 18 18 24 16 16 1 16 16 16 1 16 16 16 16 16 16 16 8 3 7 16 16 16 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 18 18 18 18
18 18 18 18 18 18 18 24 16 16 1 16 16 16 1 16 16 16 16 16 16 16 8 3 7 1 1 1 16 16 16 16 16 16 16 8 3 7 1 23 18 18 18 18 18 18 18 18 18 18
18 18 18 18 18 18 18 24 16 16 1 16 16 16 1 16 16 16 16 16 16 16 8 3 7 16 16 1 16 16 16 16 16 16 16 8 3 7 1 23 18 18 19 18 18 18 18 18 18 18

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;