Stored height alongside width in dungeon
This commit is contained in:
parent
a9263a41e4
commit
b5df8cfcaf
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user