diff --git a/cicaprojekt/Dungeon.java b/cicaprojekt/Dungeon.java index db65105..62a8a3a 100644 --- a/cicaprojekt/Dungeon.java +++ b/cicaprojekt/Dungeon.java @@ -33,6 +33,7 @@ public class Dungeon { { Tile oneilllocation = null; Tile jaffalocation = null; + Tile replicatorlocation = null; try(BufferedReader reader = new BufferedReader(new FileReader(input))) { String[] sizedata = reader.readLine().split("x"); // read size data at beginning of file @@ -93,6 +94,16 @@ public class Dungeon { dungeon[y][x] = tempscale; scalecount++; break; + + case 'X': + dungeon[y][x] = new Gap(); + break; + + case 'R': + Field replicatorfield = new Field(); + dungeon[y][x] = replicatorfield; + replicatorlocation = replicatorfield; + break; } } } @@ -139,6 +150,7 @@ public class Dungeon { Map playermap = new HashMap<>(); playermap.put("oneill", oneilllocation); playermap.put("jaffa", jaffalocation); + playermap.put("replicator", replicatorlocation); return playermap; }