diff --git a/src/launcher/Settings.java b/src/launcher/Settings.java index c52bc7a..7ff6a2a 100644 --- a/src/launcher/Settings.java +++ b/src/launcher/Settings.java @@ -22,19 +22,22 @@ public class Settings { public void setSettings() throws Exception { HashMap set = Launcher.pointer.getArraysettings(); - int width = (Integer) set.get("width"); - int height = (Integer) set.get("height"); - int rounds = (Integer) set.get("rounds"); - boolean fullscreen = (Boolean) set.get("fullscreen"); - String character1 = (String) set.get("character1"); - String character2 = (String) set.get("character2"); - String stage = (String) set.get("stage"); - try { + int width = (Integer) set.get("width"); + int height = (Integer) set.get("height"); + int rounds = (Integer) set.get("rounds"); + boolean fullscreen = (Boolean) set.get("fullscreen"); + String character1 = (String) set.get("character1"); + String character2 = (String) set.get("character2"); + String stage = (String) set.get("stage"); config.write(width, height, rounds, fullscreen, character1, character2, stage); } catch (Exception e) { - e.printStackTrace(); + config.write(800, 600, 3, false, "default", "default", "default"); + System.out.println("Incorrect config file"); } } + public String getResolution() { + return "" + Integer.toString(config.width) + "x" + Integer.toString(config.height); + } }