diff --git a/src/main/java/project/app/warzone/Model/Postload.java b/src/main/java/project/app/warzone/Model/Postload.java index eaa1005..5b84e64 100644 --- a/src/main/java/project/app/warzone/Model/Postload.java +++ b/src/main/java/project/app/warzone/Model/Postload.java @@ -51,18 +51,6 @@ public void saveMap(String p_filename) { ge.setPhase(new PlaySetup(ge)); } - /** - * @param p_fileName filename - */ - public void validateMap() { - printInvalidCommandMessage(); - } - - public void saveMap(String p_filename) { - // Call savemap func after creation of it - ge.setPhase(new PlaySetup(ge)); - } - public void showMap(MapFeatures newmapFeatures) { LogObject l_logObject = new LogObject(); l_logObject.setD_command("showmap"); diff --git a/src/test/java/project/app/warzone/Features/CardTest.java b/src/test/java/project/app/warzone/Features/CardTest.java index c9362cc..bdb7416 100644 --- a/src/test/java/project/app/warzone/Features/CardTest.java +++ b/src/test/java/project/app/warzone/Features/CardTest.java @@ -130,9 +130,10 @@ public void testBombCountry() { public void testNegotiatedPlayer() { d_playerFeatures.assignCountries(d_gameEngine); + MapFeatures mapFeatures = MapFeatures.getInstance(); d_gameEngine.getGamePhase().loadMap("europe"); - d_gameEngine.getGamePhase().showMap(new MapFeatures()); + d_gameEngine.getGamePhase().showMap(mapFeatures); d_gameEngine.getGamePhase().setPlayers("add", "rochelle"); d_gameEngine.getGamePhase().setPlayers("add", "numan"); d_gameEngine.getGamePhase().assignCountriesForDemo(); diff --git a/src/test/java/project/app/warzone/Model/AttackOrderTest.java b/src/test/java/project/app/warzone/Model/AttackOrderTest.java index b037f65..1ce2716 100644 --- a/src/test/java/project/app/warzone/Model/AttackOrderTest.java +++ b/src/test/java/project/app/warzone/Model/AttackOrderTest.java @@ -274,9 +274,10 @@ public void testAttackonNegotiatedCountry() { d_playerFeatures.assignCountries(d_gameEngine); LogObject l_logObject = new LogObject(); + MapFeatures mapFeatures= MapFeatures.getInstance(); d_gameEngine.getGamePhase().loadMap("europe"); - d_gameEngine.getGamePhase().showMap(new MapFeatures()); + d_gameEngine.getGamePhase().showMap(mapFeatures); d_gameEngine.getGamePhase().setPlayers("add","rochelle"); d_gameEngine.getGamePhase().setPlayers("add","numan"); d_gameEngine.getGamePhase().assignCountriesForDemo();