diff --git a/core/app/Controller.java b/core/app/Controller.java index 50e8971b817b6d3f133f52ef3ed0594392fd05d1..3d7c36a654e3336e7ea5901aac49ddfa3c63b41c 100644 --- a/core/app/Controller.java +++ b/core/app/Controller.java @@ -39,7 +39,6 @@ import view.ZPMView; public class Controller { private View view; - private GameController game; private int colonelLife; private int jaffaLife; @@ -107,15 +106,14 @@ public class Controller { if(!initMap(mapPath)) { System.err.println("Map with path " + mapPath + " has initialization problems"); - // TODO it may be better to move on with level - // actualLvl--; + actualLvl--; continue; } updateLifeSettings(); uploadMapDatas(); - game = new GameController(view, InitController.map.length, InitController.map[0].length); + GameController game = new GameController(view, InitController.map.length, InitController.map[0].length); game.startGameProcess(); //actualLvl++; } catch (FileNotFoundException e) { diff --git a/core/view/GameWindow.java b/core/view/GameWindow.java index 5880301702dda96bf22dcd7745acbb2109203b1f..de7608984aa16856f8d53fbaf30eb39465e26680 100644 --- a/core/view/GameWindow.java +++ b/core/view/GameWindow.java @@ -62,7 +62,6 @@ class GameWindow extends JFrame implements KeyListener { } // TODO size of table - // currently the table fills the frame JPanel mapPanel = new JPanel(new GridLayout(mapWidth, mapHeight)); for (ElementPanel[] elementPanels : elemPanels) { for (ElementPanel elementPanel : elementPanels) { @@ -107,6 +106,7 @@ class GameWindow extends JFrame implements KeyListener { public void setElement(int x, int y, ArrayList<ViewElement> viewElem) { // TODO error check + // Sort ViewElements in order to draw images // in the appropriate order. if(viewElem != null) {