Players are now properly initialized

This commit is contained in:
Bokros Bálint 2016-04-25 19:38:35 +02:00
parent 9f5c310e12
commit d61be1d967

View File

@ -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);