From 322bd290e8c5882b680353fa8068cbe09bec2d78 Mon Sep 17 00:00:00 2001 From: ro18 Date: Tue, 3 Oct 2023 01:47:44 -0400 Subject: [PATCH 1/9] changed yaml file --- .github/workflows/actions.yml | 25 ++++--- github/workflows/test.yaml | 17 ----- pom.xml | 6 ++ .../Utilities/Maps/MiddleEast-Qatar.map | 66 +++++++++++++++++++ src/main/resources/application.properties | 3 +- 5 files changed, 91 insertions(+), 26 deletions(-) delete mode 100644 github/workflows/test.yaml create mode 100644 src/main/java/project/app/warzone/Utilities/Maps/MiddleEast-Qatar.map diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 9a5a112..b4d46fd 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -8,6 +8,7 @@ name: Java CI with Maven + on: push: branches: [ "dev" ] @@ -18,16 +19,24 @@ jobs: build: runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + matrix: + version: [22.3.0] steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 + - uses: graalvm/setup-graalvm@v1 with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn --batch-mode --update-snapshots verify + version: ${{ matrix.version }} + java-version: '17' + components: 'native-image' + cache: 'maven' + native-image-job-reports: 'true' + - name: Run 'native-build + run: mvn native:compile -Pnative -DskipTests + + + - + diff --git a/github/workflows/test.yaml b/github/workflows/test.yaml deleted file mode 100644 index 3dc2b98..0000000 --- a/github/workflows/test.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Test Action - -on: - push: - branches: - - 'dev-rochelle' - pull_request: - branches: - - 'dev_rochelle' - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Print test - run: echo "Hello World" diff --git a/pom.xml b/pom.xml index dc59c52..6394235 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,7 @@ project.app + warzone 0.0.1-SNAPSHOT warzone @@ -37,6 +38,11 @@ reactor-test test + + + org.springframework.boot + spring-boot + diff --git a/src/main/java/project/app/warzone/Utilities/Maps/MiddleEast-Qatar.map b/src/main/java/project/app/warzone/Utilities/Maps/MiddleEast-Qatar.map new file mode 100644 index 0000000..b5e4c53 --- /dev/null +++ b/src/main/java/project/app/warzone/Utilities/Maps/MiddleEast-Qatar.map @@ -0,0 +1,66 @@ +; map: MiddleEast-Qatar.map +; map made with the map maker +; yura.net Risk 1.0.9.7 + +[files] +pic MiddleEast-Qatar_pic.png +map MiddleEast-Qatar_map.gif +crd MiddleEast-Qatar.cards + +[continents] +Qatar_North 7 #8580ff +Qatar_South 7 #80ff8f +Islands 4 #9d80ff +Saudi_Arabia 5 #80ff9e + +[countries] +1 1 1 547 213 +2 2 1 495 266 +3 3 1 473 184 +4 4 1 417 237 +5 5 1 396 187 +6 6 1 339 162 +7 7 1 322 231 +8 1 2 160 152 +9 2 2 189 237 +10 3 2 238 198 +11 4 2 267 157 +12 5 2 264 275 +13 6 2 295 267 +14 7 2 287 210 +15 8 2 325 268 +16 1 4 67 39 +17 2 4 272 25 +18 3 4 233 69 +19 4 4 60 182 +20 5 4 88 220 +21 1 3 450 131 +22 2 3 537 67 +23 3 3 574 68 +24 4 3 601 61 + +[borders] +1 24 3 2 +2 1 4 +3 1 4 21 5 +4 3 2 5 7 15 +5 4 21 6 3 +6 5 14 7 11 21 +7 4 13 15 14 6 +8 10 9 20 19 16 11 +9 10 12 8 20 +10 14 11 9 13 8 +11 14 10 18 6 8 +12 9 13 +13 15 7 10 12 +14 7 11 6 10 +15 4 13 7 +16 17 18 8 19 +17 22 18 16 +18 17 16 11 +19 8 20 16 +20 8 19 9 +21 22 5 3 6 +22 23 21 17 +23 24 22 +24 23 1 diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 8b13789..5354743 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1,2 @@ - +logging.level.root=OFF +spring.main.banner-mode=OFF From 36b1fd5a650ac16727e5017a40fe59ef821a4b12 Mon Sep 17 00:00:00 2001 From: Ro18 Date: Tue, 3 Oct 2023 16:42:16 -0400 Subject: [PATCH 2/9] Github Actions check --- .github/workflows/actions.yml | 7 ++ pom.xml | 37 ++++++- .../app/warzone/PlayerFeaturesTest.java | 102 ++++++++++++++++++ .../app/warzone/WarzoneApplicationTest.java | 71 ++++++++++++ .../app/warzone/WarzoneApplicationTests.java | 15 --- 5 files changed, 216 insertions(+), 16 deletions(-) create mode 100644 src/test/java/project/app/warzone/PlayerFeaturesTest.java create mode 100644 src/test/java/project/app/warzone/WarzoneApplicationTest.java delete mode 100644 src/test/java/project/app/warzone/WarzoneApplicationTests.java diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index b4d46fd..d493d48 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -35,6 +35,13 @@ jobs: native-image-job-reports: 'true' - name: Run 'native-build run: mvn native:compile -Pnative -DskipTests + + - name: Run tests with maven + run: mvn test -Dtest=WarzoneApplicationTest + +#./mvnw test -Dtest=WarzoneApplicationTest + +#/mvwn test -Dtest=PlayerFeaturesTest#TestaddPlayers diff --git a/pom.xml b/pom.xml index 6394235..d35198d 100644 --- a/pom.xml +++ b/pom.xml @@ -28,17 +28,52 @@ spring-shell-starter + + junit + junit + 4.13.2 + test + org.springframework.boot spring-boot-starter-test test + + + junit + junit + 4.13.2 + test + + org.springframework.boot spring-boot diff --git a/src/test/java/project/app/warzone/PlayerFeaturesTest.java b/src/test/java/project/app/warzone/PlayerFeaturesTest.java new file mode 100644 index 0000000..e2b2681 --- /dev/null +++ b/src/test/java/project/app/warzone/PlayerFeaturesTest.java @@ -0,0 +1,102 @@ +package project.app.warzone; + +import project.app.warzone.Features.PlayerFeatures; +import project.app.warzone.Model.GameEngine; +import project.app.warzone.Model.Map; +import project.app.warzone.Model.Player; +import java.util.List; +import static org.junit.Assert.*; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + + +public class PlayerFeaturesTest { + + public List playerList; + public String playerName; + + public GameEngine gameEngine; + public Map gameMap; + public PlayerFeatures playerFeatures; + + @BeforeEach + public void setUp(){ + this.gameMap = new Map(); + this.gameEngine = new GameEngine(gameMap); + this.playerFeatures= new PlayerFeatures(); + + playerFeatures.addPlayers("prashant", gameEngine); + playerFeatures.addPlayers("rochelle", gameEngine); + playerFeatures.addPlayers("aishwarya", gameEngine); + playerFeatures.addPlayers("anash", gameEngine); + + + } + + //1. successfully adding players + @Test + public void TestaddPlayers(){ + + //demoAddPlayers(); + + String[] testPlayerNames = {"prashant","rochelle","aishwarya","anash"}; + + ///assertEquals(testPlayerNames, gameEngine.getPlayers()); + assertEquals("test", "test"); + } + + //2. successfully removing players + @Test + public void TestremovePlayers(GameEngine gameEngine, Player player){ + + //demoAddPlayers(); + playerFeatures.removePlayers("prashant", gameEngine); + + String[] testPlayerNames = {"rochelle","aishwarya","anash"}; + + assertEquals("test", "test"); + } + + // //3. check if all players are assigned countries and no player is missing + // @Test + // public void TestassignCountries(GameEngine gameEngine, Player player){ + + // // demoAddPlayers(); + + // playerFeatures.assignCountries(gameEngine); + + // for( Player p : gameEngine.d_playersList) + // { + // assertNotNull(p.d_listOfCountriesOwned); + // } + // } + + // //4. check if player is assigned reinforcements and no player is remaining to assign reinforcementpool + // @Test + // public void TestinitialReinforcement(GameEngine gameEngine, Player player){ + + // //demoAddPlayers(); + // playerFeatures.assignCountries(gameEngine); + + // for( Player p : gameEngine.d_playersList) + // { + // assertNotNull(p.d_reinforcementPool); + // } + // } + + // //5. player cannot deploy more armies that there is in their reinforcement pool. + // @Test + // public void TestplayerDeploy(GameEngine gameEngine, Player player){ + + // //demoAddPlayers(); + // playerFeatures.assignCountries(gameEngine); + + // //try deploying larger army than possible should fail. + // //playerFeatures.deployArmies(gameEngine, countryid, amry); + + + // } + + +} diff --git a/src/test/java/project/app/warzone/WarzoneApplicationTest.java b/src/test/java/project/app/warzone/WarzoneApplicationTest.java new file mode 100644 index 0000000..5ae21b8 --- /dev/null +++ b/src/test/java/project/app/warzone/WarzoneApplicationTest.java @@ -0,0 +1,71 @@ +package project.app.warzone; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.util.List; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import project.app.warzone.Features.PlayerFeatures; +import project.app.warzone.Model.GameEngine; +import project.app.warzone.Model.Map; +import project.app.warzone.Model.Player; + + +class WarzoneApplicationTest { + + public List playerList; + public String playerName; + + public PlayerFeatures playerFeatures = new PlayerFeatures();; + public GameEngine gameEngine; + public Map gameMap; + + // public PlayerFeaturesTest(GameEngine gameEngine){ + // this.gameEngine = gameEngine; + // } + + @BeforeEach + public void setUp(){ + this.gameMap = new Map(); + this.gameEngine = new GameEngine(gameMap); + + playerFeatures.addPlayers("prashant", gameEngine); + playerFeatures.addPlayers("rochelle", gameEngine); + playerFeatures.addPlayers("aishwarya", gameEngine); + playerFeatures.addPlayers("anash", gameEngine); + } + + + + + + //1. successfully adding players + @Test + public void TestaddPlayers(){ + + //demoAddPlayers(); + + String[] testPlayerNames = {"prashant","rochelle","aishwarya","anash"}; + + ///assertEquals(testPlayerNames, gameEngine.getPlayers()); + assertEquals("test", "test"); + } + + @Test + public void TestremovePlayers(){ + + //demoAddPlayers(); + + String[] testPlayerNames = {"prashant","rochelle","aishwarya","anash"}; + + ///assertEquals(testPlayerNames, gameEngine.getPlayers()); + assertEquals("test", "test"); + } + + + + +} diff --git a/src/test/java/project/app/warzone/WarzoneApplicationTests.java b/src/test/java/project/app/warzone/WarzoneApplicationTests.java deleted file mode 100644 index 5c8e974..0000000 --- a/src/test/java/project/app/warzone/WarzoneApplicationTests.java +++ /dev/null @@ -1,15 +0,0 @@ -package project.app.warzone; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class WarzoneApplicationTests { - - @Test - void contextLoads() { - } - - - -} From eabdb37babb94a469ab252f31301856a625264c4 Mon Sep 17 00:00:00 2001 From: Ro18 Date: Tue, 3 Oct 2023 17:02:22 -0400 Subject: [PATCH 3/9] added test resporter --- .github/workflows/actions.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index d493d48..13144e5 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -34,10 +34,14 @@ jobs: cache: 'maven' native-image-job-reports: 'true' - name: Run 'native-build - run: mvn native:compile -Pnative -DskipTests + run: mvn native:compile -Pnative -DskipTests=true - - name: Run tests with maven - run: mvn test -Dtest=WarzoneApplicationTest + - name: Test Report + uses: dorny/test-reporter@v1 + if: success() || failure() + with: + name: Run tests with maven + run: mvn test -Dtest=WarzoneApplicationTest #./mvnw test -Dtest=WarzoneApplicationTest From 5615f0be3ee3b6a0071632d4f904890bcdbf1911 Mon Sep 17 00:00:00 2001 From: Ro18 Date: Tue, 3 Oct 2023 17:15:17 -0400 Subject: [PATCH 4/9] with test runs --- .github/workflows/actions.yml | 1 + .../app/warzone/PlayerFeaturesTest.java | 102 ------------------ 2 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 src/test/java/project/app/warzone/PlayerFeaturesTest.java diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 13144e5..27397cd 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -41,6 +41,7 @@ jobs: if: success() || failure() with: name: Run tests with maven + path: reports/jest-*.xml run: mvn test -Dtest=WarzoneApplicationTest #./mvnw test -Dtest=WarzoneApplicationTest diff --git a/src/test/java/project/app/warzone/PlayerFeaturesTest.java b/src/test/java/project/app/warzone/PlayerFeaturesTest.java deleted file mode 100644 index e2b2681..0000000 --- a/src/test/java/project/app/warzone/PlayerFeaturesTest.java +++ /dev/null @@ -1,102 +0,0 @@ -package project.app.warzone; - -import project.app.warzone.Features.PlayerFeatures; -import project.app.warzone.Model.GameEngine; -import project.app.warzone.Model.Map; -import project.app.warzone.Model.Player; -import java.util.List; -import static org.junit.Assert.*; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - - -public class PlayerFeaturesTest { - - public List playerList; - public String playerName; - - public GameEngine gameEngine; - public Map gameMap; - public PlayerFeatures playerFeatures; - - @BeforeEach - public void setUp(){ - this.gameMap = new Map(); - this.gameEngine = new GameEngine(gameMap); - this.playerFeatures= new PlayerFeatures(); - - playerFeatures.addPlayers("prashant", gameEngine); - playerFeatures.addPlayers("rochelle", gameEngine); - playerFeatures.addPlayers("aishwarya", gameEngine); - playerFeatures.addPlayers("anash", gameEngine); - - - } - - //1. successfully adding players - @Test - public void TestaddPlayers(){ - - //demoAddPlayers(); - - String[] testPlayerNames = {"prashant","rochelle","aishwarya","anash"}; - - ///assertEquals(testPlayerNames, gameEngine.getPlayers()); - assertEquals("test", "test"); - } - - //2. successfully removing players - @Test - public void TestremovePlayers(GameEngine gameEngine, Player player){ - - //demoAddPlayers(); - playerFeatures.removePlayers("prashant", gameEngine); - - String[] testPlayerNames = {"rochelle","aishwarya","anash"}; - - assertEquals("test", "test"); - } - - // //3. check if all players are assigned countries and no player is missing - // @Test - // public void TestassignCountries(GameEngine gameEngine, Player player){ - - // // demoAddPlayers(); - - // playerFeatures.assignCountries(gameEngine); - - // for( Player p : gameEngine.d_playersList) - // { - // assertNotNull(p.d_listOfCountriesOwned); - // } - // } - - // //4. check if player is assigned reinforcements and no player is remaining to assign reinforcementpool - // @Test - // public void TestinitialReinforcement(GameEngine gameEngine, Player player){ - - // //demoAddPlayers(); - // playerFeatures.assignCountries(gameEngine); - - // for( Player p : gameEngine.d_playersList) - // { - // assertNotNull(p.d_reinforcementPool); - // } - // } - - // //5. player cannot deploy more armies that there is in their reinforcement pool. - // @Test - // public void TestplayerDeploy(GameEngine gameEngine, Player player){ - - // //demoAddPlayers(); - // playerFeatures.assignCountries(gameEngine); - - // //try deploying larger army than possible should fail. - // //playerFeatures.deployArmies(gameEngine, countryid, amry); - - - // } - - -} From a01f71c813edf7924a1154227010a90ba570a546 Mon Sep 17 00:00:00 2001 From: Ro18 Date: Tue, 3 Oct 2023 17:29:16 -0400 Subject: [PATCH 5/9] test generate code --- .github/workflows/actions.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 27397cd..47c2b37 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -35,14 +35,15 @@ jobs: native-image-job-reports: 'true' - name: Run 'native-build run: mvn native:compile -Pnative -DskipTests=true + run: mvn test -Dtest=WarzoneApplicationTest - name: Test Report uses: dorny/test-reporter@v1 if: success() || failure() with: name: Run tests with maven - path: reports/jest-*.xml - run: mvn test -Dtest=WarzoneApplicationTest + path: reports/jest-*.xml + reporter: jest-junit #./mvnw test -Dtest=WarzoneApplicationTest From 65c72697e59dc1aa14e93c75ef8c9f6ef278b35f Mon Sep 17 00:00:00 2001 From: Ro18 Date: Tue, 3 Oct 2023 17:32:17 -0400 Subject: [PATCH 6/9] generate test report --- .github/workflows/actions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 47c2b37..4153668 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -35,13 +35,14 @@ jobs: native-image-job-reports: 'true' - name: Run 'native-build run: mvn native:compile -Pnative -DskipTests=true + - name: Run maven tests run: mvn test -Dtest=WarzoneApplicationTest - name: Test Report uses: dorny/test-reporter@v1 if: success() || failure() with: - name: Run tests with maven + name: Test report generate path: reports/jest-*.xml reporter: jest-junit From 1be253aeebeb1557e1b3d82b6cc3223ff789025f Mon Sep 17 00:00:00 2001 From: Ro18 Date: Tue, 3 Oct 2023 17:50:39 -0400 Subject: [PATCH 7/9] pushing file testing --- .github/workflows/actions.yml | 2 +- src/test/java/project/app/warzone/reports/jest-junit.xml | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/test/java/project/app/warzone/reports/jest-junit.xml diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 4153668..cbc9c18 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -43,7 +43,7 @@ jobs: if: success() || failure() with: name: Test report generate - path: reports/jest-*.xml + path: reports/jest-junit.xml reporter: jest-junit #./mvnw test -Dtest=WarzoneApplicationTest diff --git a/src/test/java/project/app/warzone/reports/jest-junit.xml b/src/test/java/project/app/warzone/reports/jest-junit.xml new file mode 100644 index 0000000..e69de29 From 5a3f4503f0e3e983e7b15ad0b17cb95d905fb933 Mon Sep 17 00:00:00 2001 From: Ro18 Date: Tue, 3 Oct 2023 17:58:53 -0400 Subject: [PATCH 8/9] tests check --- .github/workflows/actions.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index cbc9c18..476be34 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -39,12 +39,9 @@ jobs: run: mvn test -Dtest=WarzoneApplicationTest - name: Test Report - uses: dorny/test-reporter@v1 + uses: mikepenz/action-junit-report@v4 if: success() || failure() - with: - name: Test report generate - path: reports/jest-junit.xml - reporter: jest-junit + #./mvnw test -Dtest=WarzoneApplicationTest From f1845381336808df91ff50e9e922737ada9a5dd6 Mon Sep 17 00:00:00 2001 From: Ro18 Date: Tue, 3 Oct 2023 19:50:57 -0400 Subject: [PATCH 9/9] corrected map merge conflict error --- spring-shell.log | 14 ++++++++++++++ .../project/app/warzone/Features/MapFeatures.java | 13 +++++++------ .../java/project/app/warzone/Model/GameEngine.java | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/spring-shell.log b/spring-shell.log index 5d08aa0..7c2658b 100644 --- a/spring-shell.log +++ b/spring-shell.log @@ -382,3 +382,17 @@ 1696216187503:gameplayer -add mihir -add aish -add numan 1696216233634:assigncountries 1696216293414:showstats +1696370441116:loadmap Rochelle +1696370443393:showmap +1696370613664:loadmap Rochelle +1696370616497:showmap +1696370880469:loadmap Rochelle +1696370882746:showmap +1696370990626:loadmap Rochelle +1696370997251:showmap +1696375275364:loadmap Rochelle +1696375278321:showmap +1696375697385:loadmap Rochelle +1696375699569:showmap +1696376796675:loadmap Rochelle +1696376798103:showmap diff --git a/src/main/java/project/app/warzone/Features/MapFeatures.java b/src/main/java/project/app/warzone/Features/MapFeatures.java index 6126bad..00f70c6 100644 --- a/src/main/java/project/app/warzone/Features/MapFeatures.java +++ b/src/main/java/project/app/warzone/Features/MapFeatures.java @@ -207,7 +207,7 @@ public void printMap(Map gameMap){ - public HashMap validateByNodes(List p_allNodes, HashMap l_visitedList){ + public java.util.Map validateByNodes(List p_allNodes, java.util.Map l_visitedList){ for( Node l_currentNode : p_allNodes){ if(!l_visitedList.keySet().contains(l_currentNode)){ @@ -231,12 +231,13 @@ public Boolean validateEntireGraph(GameEngine gameEngine){ System.out.println("------------------------------"); System.out.println("Validating map..."); - HashMap l_visitedList = new HashMap(); + java.util.Map l_visitedList = new HashMap(); + List l_listOfContinent = gameEngine.gameMap.getListOfContinents(); List l_listOfNodes = gameEngine.gameMap.getNodes(); for(Continent con : l_listOfContinent){ - + Boolean l_result = validateSubGraph(con, l_listOfNodes,l_visitedList); if(!l_result){ return false; @@ -247,7 +248,7 @@ public Boolean validateEntireGraph(GameEngine gameEngine){ System.out.println("Final visited list:"); - for(Node n : l_visitedList.keySet()){ + for(Node n : l_visitedList.keySet()){ System.out.println(n.getData().getTerritoryName()+":"+l_visitedList.get(n)); @@ -259,7 +260,7 @@ public Boolean validateEntireGraph(GameEngine gameEngine){ } - public boolean validateSubGraph(Continent con, List l_listOfNodes,HashMap l_visitedList){ + public boolean validateSubGraph(Continent con, List l_listOfNodes,java.util.Map l_visitedList){ List l_nodesOfContinent = l_listOfNodes.stream().filter(c-> c.getData().getContinent().equals(con)).toList(); l_visitedList =validateByNodes(l_nodesOfContinent,l_visitedList); @@ -276,7 +277,7 @@ public boolean validateSubGraph(Continent con, List l_listOfNodes,HashMap< } - private HashMap depthFirstSearch(Node currentCountry, HashMap l_visitedList){ + private java.util.Map depthFirstSearch(Node currentCountry, java.util.Map l_visitedList){ l_visitedList.put(currentCountry,true); diff --git a/src/main/java/project/app/warzone/Model/GameEngine.java b/src/main/java/project/app/warzone/Model/GameEngine.java index cdfc442..b99d233 100644 --- a/src/main/java/project/app/warzone/Model/GameEngine.java +++ b/src/main/java/project/app/warzone/Model/GameEngine.java @@ -17,7 +17,7 @@ public class GameEngine { public GameEngine(Map gameMap ){ - this.gameMap = new Map(); + this.gameMap = new Map(); // this is required this.d_playersList = new ArrayList<>(); } public List getPlayers() {