From d61be1d9675b5bec2fced9e167e4b18c8c40082f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bokros=20B=C3=A1lint?= Date: Mon, 25 Apr 2016 19:38:35 +0200 Subject: [PATCH] Players are now properly initialized --- cicaprojekt/Tester.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cicaprojekt/Tester.java b/cicaprojekt/Tester.java index 5ba125b..5d53515 100644 --- a/cicaprojekt/Tester.java +++ b/cicaprojekt/Tester.java @@ -1,6 +1,5 @@ package cicaprojekt; -import java.io.Console; import java.io.File; import java.io.IOException; import java.lang.annotation.ElementType; @@ -9,6 +8,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.util.Map; public class Tester { private Player oneill; @@ -18,10 +18,14 @@ public class Tester { Dungeon loadMap(String param) throws IOException{ Dungeon dungeon = new Dungeon(); - dungeon.buildDungeon(new File(param)); + Map playerLocations = dungeon.buildDungeon(new File(param)); + oneill = new Player("ONeill", (Tile) playerLocations.get("oneill"), Direction.NORTH); + jaffa = new Player("Jaffa", (Tile) playerLocations.get("jaffa"), Direction.NORTH); return dungeon; } + + void listPlayers() { System.out.println(oneill); System.out.println(jaffa);