From e97d8c4c6d2727e0eaece86cb2f77308fabbc6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bokros=20B=C3=A1lint?= Date: Tue, 26 Apr 2016 01:06:29 +0200 Subject: [PATCH] Fixed default Tile coordinates --- cicaprojekt/Dungeon.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cicaprojekt/Dungeon.java b/cicaprojekt/Dungeon.java index 5cfd36a..fe9b061 100644 --- a/cicaprojekt/Dungeon.java +++ b/cicaprojekt/Dungeon.java @@ -33,9 +33,13 @@ public class Dungeon { * R: Replicator */ Map buildDungeon(File input) throws IOException { - Tile oneilllocation = null; - Tile jaffalocation = null; - Tile replicatorlocation = null; + Tile defaultTile = new Field(); + defaultTile.setX(-666); + defaultTile.setY(-666); + + Tile oneilllocation = defaultTile; + Tile jaffalocation = defaultTile; + Tile replicatorlocation = defaultTile; try(BufferedReader reader = new BufferedReader(new FileReader(input))) { String[] sizedata = reader.readLine().split("x"); // read size data at beginning of file