From 620a9aed3236820da9dbf023b3affcb7a72b9e3d Mon Sep 17 00:00:00 2001
From: Tamas Bunth <btomi96@gmail.com>
Date: Wed, 11 May 2016 17:34:15 +0200
Subject: [PATCH] trust me im an engineer

---
 core/app/Controller.java  | 6 ++----
 core/view/GameWindow.java | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/core/app/Controller.java b/core/app/Controller.java
index 50e8971..3d7c36a 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 5880301..de76089 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) {
-- 
GitLab