diff --git a/HeatUp/src/de/heatup/cfg/Config.java b/HeatUp/src/de/heatup/cfg/Config.java index 79fd2ab..7b8fd5f 100644 --- a/HeatUp/src/de/heatup/cfg/Config.java +++ b/HeatUp/src/de/heatup/cfg/Config.java @@ -16,13 +16,13 @@ public class Config { public static int singleTilePixels = gamePanelWidth/mapMaxTilesWidth; public static void setGamePanelWidth(int width) { // Wir wollen hier keine Reste! - while (width % mapMaxTilesHeight != 0) { + while (width % mapMaxTilesWidth != 0) { width--; } gamePanelWidth = width; updateSingleTilePixels(); } private static void updateSingleTilePixels() { - singleTilePixels = gamePanelWidth/mapMaxTilesHeight; + singleTilePixels = gamePanelWidth/mapMaxTilesWidth; } } diff --git a/HeatUp/src/de/heatup/ui/GameInterface.java b/HeatUp/src/de/heatup/ui/GameInterface.java index b5edc06..847a71f 100644 --- a/HeatUp/src/de/heatup/ui/GameInterface.java +++ b/HeatUp/src/de/heatup/ui/GameInterface.java @@ -122,4 +122,7 @@ public class GameInterface extends JFrame { public static JPanel getGamePanel() { return gamePanel; } + public static JPanel getStatusPanel() { + return statusPanel; + } }