From b5df8cfcaf2d9a3ea8191271619e93b125ab1b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bokros=20B=C3=A1lint?= Date: Sat, 14 May 2016 02:48:19 +0200 Subject: [PATCH] Stored height alongside width in dungeon --- cicaprojekt/Dungeon.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cicaprojekt/Dungeon.java b/cicaprojekt/Dungeon.java index da1d4af..f3ba4b6 100644 --- a/cicaprojekt/Dungeon.java +++ b/cicaprojekt/Dungeon.java @@ -8,6 +8,7 @@ public class Dungeon { private int ZPMsToWin = 0; private long timeLimit = 0; private int mapWidth = 0; + private int mapHeight = 0; /* NOTE: this function assumes that the parameter input is a well-formatted dungeon file. @@ -55,6 +56,7 @@ public class Dungeon { int height = Integer.parseInt(sizedata[1]); mapWidth = width; // remember this value + mapHeight = height; Tile[][] dungeon = new Tile[width][height]; @@ -207,4 +209,8 @@ public class Dungeon { public int getMapWidth() { return mapWidth; } + + public int getMapHeight() { + return mapHeight; + } } \ No newline at end of file