diff --git a/spring-shell.log b/spring-shell.log index 6b83e76..5d08aa0 100644 --- a/spring-shell.log +++ b/spring-shell.log @@ -173,6 +173,185 @@ 1696010523822:gameplayer -add p1 p2 1696010545967:assigncountries 1696010551252:showstats +1696138152221:loadmap europe +1696138154662:showmap +1696138987613:loadmap europe +1696138990960:showmap +1696139443070:loadmap europe +1696139445985:showmap +1696139641115:loadmap europe +1696139645028:showmap +1696180502912:loadmap Simpsons +1696180505849:showmap +1696180833735:loadmap Simpsons +1696180835769:showmap +1696181245234:loadmap Simposons +1696181251342:loadmap Simpsons +1696181253363:showmap +1696182129886:loadmap Simpsons +1696182132036:showmap +1696182731150:loadmap Simpsons +1696182733528:showmap +1696183665627:loadmap Rochelle +1696183667926:showmap +1696183745099:loadmap Rochelle +1696183750183:showmap +1696183872062:loadmap Rochelle +1696183874050:showmap +1696183934792:loadmap Rochelle +1696183936632:showmap +1696184342589:loadmap Simpsons +1696184344222:showmap +1696184444822:loadmap Simpsons +1696184446313:showmap +1696184563399:loadmap Simpsons +1696184566060:showmap +1696184658969:loadmap Simpsons +1696184660417:showmap +1696184694630:loadmap Simpsons +1696184697606:showmap +1696184724651:loadmap Simpsons +1696184727925:showmap +1696185014590:loadmap Simpsons +1696185018770:showmap +1696185122111:loadmap Simpsons +1696185123956:showmap +1696185152212:loadmap Rochelle +1696185155257:showmap +1696193693491:loadmap Rochelle +1696193699676:showmap +1696194007596:loadmap Rochelle +1696194015615:showmap +1696195808327:loadmap Rochelle +1696195811252:showmap +1696195943914:loadmap Simpsons +1696195946984:showmap +1696196003912:loadmap europe +1696196006539:showmap +1696196315076:loadmap europe +1696196316918:showmap +1696196480349:loadmap Rochelle +1696196482690:showmap +1696197299115:loadmap europe1 +1696197302057:showmap +1696197349789:loadmap europe1 +1696197351279:showmap +1696197385282:loadmap europe1 +1696197387108:showmap +1696197409383:loadmap europe1 +1696197410598:showmap +1696197886587:loadmap europe1 +1696197888319:showmap +1696197914242:loadmap europe1 +1696197916691:showmap +1696198051269:loadmap europe1 +1696198052651:showmap +1696198074231:loadmap europe1 +1696198082289:showmap +1696198106562:loadmap europe1 +1696198108025:showmap +1696198178954:loadmap europe1 +1696198180827:showmap +1696198432691:loadmap europe1 +1696198434116:showmap +1696198599935:loadmap europe1 +1696198602972:showmap +1696198724231:loadmap europe1 +1696198725740:showmap +1696199054174:loadmap europe1 +1696199055684:showmap +1696199152915:loadmap europe1 +1696199154693:showmap +1696199243021:loadmap europe1 +1696199244497:showmap +1696200989008:loadmap europe +1696200994334:showmap +1696201023137:gameplayer -add barbie ken +1696201029250:assigncountries +1696201035466:showstats +1696201470368:loadmap europe +1696201472937:showmap +1696201480290:gameplayer -add barbie ken +1696201511746:loadmap europe +1696201513869:showmap +1696201525982:gameplayer -add barbie -add ken +1696201591131:loadmap europe +1696201593057:showmap +1696201611163:gameplayer -add barbie -add ken +1696201677559:loadmap europe +1696201678900:showmap +1696201697101:gameplayer -add barbie -add ken -add george +1696201769281:loadmap europe +1696201770863:showmap +1696201772574:gameplayer -add barbie -add ken +1696201879131:loadmap europe +1696201880566:showmap +1696201884743:gameplayer -add barbie ken +1696201912851:gameplayer -add barbie -add ken -add gary +1696202009016:loadmap europe +1696202011089:showmap +1696202015635:gameplayer -add barbie -add ken +1696202124605:loadmap europe +1696202126144:showmap +1696202127813:gameplayer -add barbie ken +1696202389759:loadmap europe +1696202392760:showmap +1696202404689:gameplayer -add barbie -add ken -add gary +1696202438263:loadmap europe +1696202439980:showmap +1696202491463:gameplayer -add bar -add beer -add clay +1696202577489:loadmap europe +1696202579086:showmap +1696202589878:gameplayer -add bar -add ken -add beer +1696202635208:loadmap europe +1696202636502:showmap +1696202650278:gameplayer -add t -add h -add k -add k +1696202753577:showmap +1696202757976:gameplayer -add bar -add ken -add beer +1696202778199:loadmap europe +1696202780083:showmap +1696202782967:gameplayer -add barbie -add ken -add gary +1696202887558:loadmap europe +1696202889319:showmap +1696202891313:gameplayer -add barbie -add ken +1696202933098:loadmap europe +1696202935175:showmap +1696202936799:gameplayer -add barbie -add ken +1696203184084:loadmap europe +1696203185330:showmap +1696203187646:gameplayer -add barbie -add ken +1696203207940:gameplayer -remove ken -remove barbie +1696203228518:gameplayer -add barbie -add ken -add gary -add aish -add priya +1696203236715:gameplayer -remove ken -remove barbie +1696203452257:loadmap europe +1696203453472:showmap +1696203455769:gameplayer -add barbie -add ken +1696203475787:assigncountries +1696203496858:gameplayer -add mihit -add aish -add rochelle +1696203521462:assigncountries +1696205720152:loadmap europe +1696205722072:showmap +1696205740412:ganeplayer -add barbie -add ken -add gary +1696205749988:gameplayer -add barbie -add ken -add gary +1696205766847:assigncountries +1696205815962:loadmap europe +1696205819027:showmap +1696205823567:gameplayer -add barbie -add ken -add gary -add aish -add priya +1696205841603:assigncountries +1696208473678:loadmap europe +1696208476092:showmap +1696208478438:gameplayer -add mihit -add aish -add rochelle +1696208487247:assigncountries +1696212390121:loadmap europe +1696212396054:showmap +1696212441920:loadmap Rochelle +1696212444918:showmap +1696212469542:loadmap europe +1696212471327:showmap +1696212491673:gameplayer -add barbie -add ken -add numan +1696212509773:gameplayer -remove ken +1696212527248:assigncountries +1696212570047:showstats 1695935641394:editmap europe 1695935648878:loadmap europe 1695935667815:editmap europe @@ -198,3 +377,8 @@ 1696003906357:editcontinent -add 2 Italy 1696132443590:editmap europe 1696132548056:editmap newmap +1696216168273:loadmap europe +1696216170025:showmap +1696216187503:gameplayer -add mihir -add aish -add numan +1696216233634:assigncountries +1696216293414:showstats diff --git a/src/main/java/project/app/warzone/Commands/MapEditorCommands.java b/src/main/java/project/app/warzone/Commands/MapEditorCommands.java index 4197147..b8e7437 100644 --- a/src/main/java/project/app/warzone/Commands/MapEditorCommands.java +++ b/src/main/java/project/app/warzone/Commands/MapEditorCommands.java @@ -51,13 +51,20 @@ public String loadMap(@ShellOption String p_filename){ } @ShellMethod(key= "showmap", value="Used to display map continents with terriotories and boundaries") - public void showmap(){ - String p_mapLocation=gameEngine.gameMap.getMapDirectory()+"/"+gameEngine.gameMap.get_USER_SELECTED_FILE()+".map"; //mac - //String p_mapLocation=gameEngine.gameMap.getMapDirectory()+"\\"+gameEngine.gameMap.get_USER_SELECTED_FILE()+".map"; //windows - //System.out.println("map location:"+p_mapLocation); + public String showmap(){ + String p_mapLocation=gameEngine.gameMap.getMapDirectory()+"\\"+gameEngine.gameMap.get_USER_SELECTED_FILE()+".map"; + gameEngine.gameMap = mapFeatures.readMap(p_mapLocation); + Boolean l_result = mapFeatures.validateEntireGraph(gameEngine); + if(!l_result){ + return("PLease try with some other map"); + } + else{ + return("You can now proceed to add gameplayers"); + } } + /** * @param p_editcmd @@ -175,6 +182,28 @@ public String editcountry(@ShellOption(value="a",defaultValue=ShellOption.NULL)S } + Boolean l_result = mapFeatures.validateEntireGraph(gameEngine); + if(!l_result){ + return("PLease try with some other map"); + } + else{ + return("You can now proceed to add gameplayers"); + } + + } + + // @ShellMethod(key= "editcontinent", value="This is used to add or update continents") + // public String editcontinent(){ + // return "You can edit continents here"; + + // String p_mapLocation=gameEngine.gameMap.getMapDirectory()+"\\test"+".map"; + + // mapFeatures.writeToMap(gameMap,p_mapLocation) + + // } + + @ShellMethod(key= "editcountry", value="This is used to add or update countries") + public String editcountry(){ return "You can edit countries here"; } diff --git a/src/main/java/project/app/warzone/Commands/PlayerCommands.java b/src/main/java/project/app/warzone/Commands/PlayerCommands.java index c4b79f0..24c10e8 100644 --- a/src/main/java/project/app/warzone/Commands/PlayerCommands.java +++ b/src/main/java/project/app/warzone/Commands/PlayerCommands.java @@ -23,12 +23,22 @@ public PlayerCommands(GameEngine gameEngine,PlayerFeatures playerFeatures){ @ShellMethod(key= "gameplayer", prefix = "-", value="Player can create or remove a player") - public String gamePlayerAdd(@ShellOption(value="a",defaultValue=ShellOption.NULL, arity = 2) String p_playerNameOne,@ShellOption(value="r", defaultValue=ShellOption.NULL, arity=2) String p_playerNameTwo){ + public String gamePlayerAdd(@ShellOption(value="a",defaultValue=ShellOption.NULL, arity = 10 ) String p_playerNameOne,@ShellOption(value="r", defaultValue=ShellOption.NULL, arity=10) String p_playerNameTwo){ + if(gameEngine.prevUserCommand == Commands.LOADMAP || gameEngine.prevUserCommand == Commands.ADDPLAYER || gameEngine.prevUserCommand == Commands.REMOVEPLAYER){ if(p_playerNameOne != null && p_playerNameOne != ""){ String l_players[] = p_playerNameOne.split(","); - playerFeatures.addPlayers(l_players,gameEngine); + int l_i=0; + while(l_i bordersToConnect = new ArrayList<>(); String[] borderDetails = l_line.split(" "); @@ -163,15 +165,19 @@ public void printMap(Map gameMap){ } System.out.print(c.getData().getTerritoryName()+" : "); String borderString =""; - List listOfBorders = c.getBorders(); - for(Node border : listOfBorders ){ + if(c.getBorders().size()> 0 && c.getBorders() != null){ + List listOfBorders = c.getBorders(); + + for(Node border : listOfBorders ){ borderString+=border.getData().getTerritoryName()+" -> "; } - borderString=borderString.substring(0,borderString.length()-4); - System.out.println(borderString); - System.out.println(); + borderString=borderString.substring(0,borderString.length()-4); + System.out.println(borderString); + System.out.println(); + } + } @@ -182,78 +188,116 @@ public void printMap(Map gameMap){ * @param p_filename * @return */ - public Map writeToMap( Map p_gameMap, String p_filename){ + //public Map writeToMap( Map p_gameMap, String p_filename){ + // public Map writeToMap( Map p_gameMap, String p_filename){ + + // BufferedReader l_reader = new BufferedReader(new FileReader(filename)); + // String l_continents = "[continents]"; + // String l_countries = "[countries]"; + // String l_borders="[borders]"; + + // if(l_reader.readLine() == ""){ + // System.out.println("Writing to an empty map file"); + // Files.writeString(filename, l_continents); + + + // } + + //} + - // BufferedReader l_reader = new BufferedReader(new FileReader(p_filename)); - // String l_continents = "[continents]"; - // String l_countries = "[countries]"; - // String l_borders="[borders]"; - // if(l_reader.readLine() == ""){ - // System.out.println("Writing to an empty map file"); - // //Files.writeString(p_filename, l_continents); + public HashMap validateByNodes(List p_allNodes, HashMap l_visitedList){ + for( Node l_currentNode : p_allNodes){ + if(!l_visitedList.keySet().contains(l_currentNode)){ + l_visitedList.put(l_currentNode,false); + } + + + } - // } + Node n = l_visitedList.entrySet().iterator().next().getKey(); + depthFirstSearch(l_visitedList.entrySet().iterator().next().getKey(),l_visitedList); - return p_gameMap; + return l_visitedList; } + public Boolean validateEntireGraph(GameEngine gameEngine){ - // public void validateByNodes(List p_allNodes, Map l_visitedList){ + System.out.println(); + System.out.println("------------------------------"); - - // //List l_allNodes = p_gameMap.getNodes(); + System.out.println("Validating map..."); + HashMap l_visitedList = new HashMap(); + List l_listOfContinent = gameEngine.gameMap.getListOfContinents(); + List l_listOfNodes = gameEngine.gameMap.getNodes(); + for(Continent con : l_listOfContinent){ - // for( Node l_currentNode : l_allNodes){ // validating continent by continent - // l_visitedList.add(l_currentNode,false); + Boolean l_result = validateSubGraph(con, l_listOfNodes,l_visitedList); + if(!l_result){ + return false; + } - // } - // Map.Entry entry = map.entrySet().iterator().next(); + } + + - // depthFirstSearch(entry.getKey(),l_visitedList); + System.out.println("Final visited list:"); + for(Node n : l_visitedList.keySet()){ - // } + System.out.println(n.getData().getTerritoryName()+":"+l_visitedList.get(n)); - // public void validateEntireGraph(GameEngine gameEngine){ + } + return true; - // System.out.println(" Running check on file:"); - // Map l_visitedList = new HashMap(); - // List l_listOfContinent = gameEngine.gameMap.getListOfContinents(); - // List l_listOfNodes = gameEngine.gameMap.getNodes(); + - // List l_nodesOfContinent = new ArrayList<>(); + } + public boolean validateSubGraph(Continent con, List l_listOfNodes,HashMap l_visitedList){ - // for(Continent con : l_listOfContinent){ + List l_nodesOfContinent = l_listOfNodes.stream().filter(c-> c.getData().getContinent().equals(con)).toList(); + l_visitedList =validateByNodes(l_nodesOfContinent,l_visitedList); + for( Node n : l_nodesOfContinent){ + if(l_visitedList.containsKey(n) && !l_visitedList.get(n)){ + System.out.println(con.getContinentName()+" is not connected"); + System.out.println(n.getData().getTerritoryName()+" cannot be reached"); + return false; + } + } - // validateSubGraph(con, l_listOfNodes,l_visitedList); - - // } + return true; - // } - // public void validateSubGraph(Continent con, List l_listOfNodes,Map l_visitedList){ + } - // List l_nodesOfContinent = l_listOfNodes.stream().filter(c-> c.continent.equals(con)); - // validateMap(l_nodesOfContinent,l_visitedList) + private HashMap depthFirstSearch(Node currentCountry, HashMap l_visitedList){ + l_visitedList.put(currentCountry,true); - // } + List l_listOfBorderNodes = currentCountry.getBorders(); - // private Map depthFirstSearch(Node currentCountry, Map l_visitedList){ + for( Node l_currentNode : l_listOfBorderNodes){ + + if(!l_visitedList.keySet().contains(l_currentNode)){ + l_visitedList.put(l_currentNode,false); - // l_visitedList.put(l_visitedList.get(currentCountry),true); - // List l_listOfBorderNodes = l_visitedList.getBorders(); + } - // for(Node node : l_listOfBorderNodes){ - // if(l_visitedList.get(node) != true){ - // depthFirstSearch(node,l_visitedList); - // } - // } - // } + } + + + for(Node node : l_listOfBorderNodes){ + if(l_visitedList.get(node) != true){ + depthFirstSearch(node,l_visitedList); + } + } + + return l_visitedList; + } } \ No newline at end of file diff --git a/src/main/java/project/app/warzone/Features/PlayerFeatures.java b/src/main/java/project/app/warzone/Features/PlayerFeatures.java index 3be1374..999bde2 100644 --- a/src/main/java/project/app/warzone/Features/PlayerFeatures.java +++ b/src/main/java/project/app/warzone/Features/PlayerFeatures.java @@ -1,7 +1,9 @@ package project.app.warzone.Features; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Optional; import java.util.Random; @@ -17,6 +19,8 @@ public class PlayerFeatures { public void showAllAssignments(List allPlayers){ for( Player p : allPlayers){ + + System.out.println("Player Id:"+p.d_playerid); System.out.println("Countries of "+p.d_playername+":"); List listOfTerritories = p.getListOfTerritories(); @@ -36,38 +40,63 @@ public void assignCountries(GameEngine p_gameEngine){ for( Player p : p_gameEngine.getPlayers()){ // logic to have players -1 country - int randomCountry = l_random.nextInt(p_gameEngine.gameMap.getNodes().size()+1); + int randomCountry = l_random.nextInt(p_gameEngine.gameMap.getNodes().size()); + + // Map playerIds = new HashMap(); + + // for(int l_i=1;l_i<=p_gameEngine.getPlayers().size();l_i++){ + // playerIds.put(l_i, false); + // } + + int randomId = l_random.nextInt(p_gameEngine.getPlayers().size()+1); + // for(int i=0 ; i< p_gameEngine.getPlayers().size() ;i++){ + // while(playerIds.get(randomId) == true){ + // randomId = l_random.nextInt(p_gameEngine.getPlayers().size()+1); + + // } + // p.setL_playerid(randomId); + // playerIds.put(randomId, true); + + // } while(p_gameEngine.gameMap.getNodes().get(randomCountry).getData().getOwnerId() != 0){ - l_random.nextInt(p_gameEngine.gameMap.getNodes().size()+1); + randomCountry = l_random.nextInt(p_gameEngine.gameMap.getNodes().size()+1); } + + + + + + p.setTerritories(p_gameEngine.gameMap.getNodes().get(randomCountry).getData()); } } - public void addPlayers(String[] p_playerNames, GameEngine gameEngine){ + public void addPlayers(String p_playerName, GameEngine gameEngine){ + + int l_size= gameEngine.getPlayers().size(); - int l_playerOrder =1; - for(String l_playerObjects : p_playerNames){ - Player player= new Player(l_playerOrder++, l_playerObjects); + + //for(String l_playerObjects : p_playerNames){ + Player player= new Player(l_size+1,p_playerName); gameEngine.d_playersList.add(player); - } + //} } - public void removePlayers(String[] p_playerNames, GameEngine gameEngine){ + public void removePlayers(String p_playerName, GameEngine gameEngine){ List playerList = gameEngine.getPlayers(); - for(String l_player: p_playerNames){ - Optional l_playerToRemove= playerList.stream().filter(c->c.getL_playername().equals(l_player)).findFirst(); + //for(String l_player: p_playerNames){ + Optional l_playerToRemove= playerList.stream().filter(c->c.getL_playername().equals(p_playerName)).findFirst(); playerList.remove(l_playerToRemove.get()); - } + //} } @@ -93,7 +122,7 @@ public void printAllPlayers(GameEngine gameEngine){ public void showStats(GameEngine gameengine){ List listOfPlayers = gameengine.getPlayers(); for(Player p : listOfPlayers){ - System.out.println("Player Name:"+p.d_playername); + System.out.println("Player Name:"+p.d_playername+"-PlayerId:"+p.d_playerid); System.out.println("Total Armies available per round: "+p.getReinforcementArmies()); System.out.println("Countries Owned - Armies"); for(Territory t : p.getListOfTerritories()){ diff --git a/src/main/java/project/app/warzone/Utilities/Maps/Castle.map b/src/main/java/project/app/warzone/Utilities/Maps/Castle.map new file mode 100644 index 0000000..4850699 --- /dev/null +++ b/src/main/java/project/app/warzone/Utilities/Maps/Castle.map @@ -0,0 +1,104 @@ +; map: Castle.map +; map made with the map maker +; yura.net Risk 1.0.9.4 + +[files] +pic Castle_pic.jpg +map Castle_map.gif +crd Castle.cards + +[continents] +Yellow 5 yellow +Blue 5 blue +Purple 3 magenta +Brown 3 gray +Red 2 red +Green 6 green + +[countries] +1 Alberton 1 70 265 +2 West_Bacon_Bridge 1 101 215 +3 Queen's_Town 1 87 342 +4 Endon 1 151 397 +5 Oakhill 1 20 393 +6 Nottingham 1 148 294 +7 Adler_Marsh 1 221 351 +8 Connover 1 315 327 +9 Great_Rowley 1 299 401 +10 North_Castle 2 305 175 +11 Upper_Castle 2 348 156 +12 South_Castle 2 339 218 +13 West_Garden 2 255 226 +14 Grand_Bridge 2 357 257 +15 Ingleshire 2 384 302 +16 Shortbend 2 489 251 +17 Easthope 3 25 134 +18 Nickleridge 3 195 176 +19 Westminister 3 74 167 +20 Ipshire 3 138 189 +21 Middle_Bank 4 553 208 +22 Crow_Hill 4 644 201 +23 Earls_Acre 4 593 142 +24 East_Bacon_Bridge 4 513 103 +25 Sheep_Meadow 4 572 61 +26 North_Pasture 4 632 78 +27 Bob_Haven 5 658 383 +28 Valleys_End 5 646 298 +29 Pattington_Field 5 579 398 +30 Anderton 5 566 345 +31 Monte 6 188 127 +32 Santiago 6 169 29 +33 Innerwood 6 175 72 +34 Chorley 6 256 38 +35 Aston 6 240 92 +36 Kings_Cross 6 307 98 +37 Sibberhold 6 370 72 +38 Yellowmoor 6 361 21 +39 Upton 6 425 21 +40 Middleton 6 424 98 +41 Junction_Pass 6 473 165 +42 Ironflatts 6 489 66 + +[borders] +1 2 6 3 +2 1 19 20 6 +3 1 6 4 5 7 +4 3 7 5 +5 3 4 +6 1 2 3 7 +7 3 4 6 8 9 +8 7 15 9 +9 7 8 15 +10 11 12 13 35 36 +11 10 12 +12 10 11 14 13 +13 10 12 +14 12 15 16 +15 8 14 16 9 +16 14 15 21 +17 19 +18 20 31 35 +19 17 2 20 +20 2 18 19 31 +21 16 23 22 +22 21 23 28 +23 21 22 24 25 26 +24 23 42 41 +25 23 26 +26 23 25 +27 28 30 29 +28 22 27 30 29 +29 27 30 28 +30 27 28 29 +31 18 20 33 35 +32 33 34 +33 31 32 34 35 +34 32 33 36 35 38 37 +35 10 18 31 33 34 36 +36 10 34 35 37 +37 34 36 39 38 40 +38 34 37 39 +39 37 38 40 42 +40 37 39 42 41 +41 24 40 42 +42 24 39 40 41 diff --git a/src/main/java/project/app/warzone/Utilities/Maps/Rochelle.map b/src/main/java/project/app/warzone/Utilities/Maps/Rochelle.map new file mode 100644 index 0000000..523f0e3 --- /dev/null +++ b/src/main/java/project/app/warzone/Utilities/Maps/Rochelle.map @@ -0,0 +1,17 @@ +[continents] +Pink 5 +Blue 3 + +[countries] +1 Rock 1 +2 Roll 1 +3 Greek 2 +4 Lamp 2 +5 Shade 2 + +[borders] +1 2 +2 1 3 +3 2 +4 5 +5 4 \ No newline at end of file diff --git a/src/main/java/project/app/warzone/Utilities/Maps/Simpsons.map b/src/main/java/project/app/warzone/Utilities/Maps/Simpsons.map new file mode 100644 index 0000000..0c7f210 --- /dev/null +++ b/src/main/java/project/app/warzone/Utilities/Maps/Simpsons.map @@ -0,0 +1,51 @@ +; map: Simpsons.map +; map made with the map maker +; yura.net Risk 1.0.9.2 +; The Simpsons Map by Bestel + +[files] +pic Simpsons_pic.png +map Simpsons_map.gif +crd Simpsons.cards + +[continents] +Rez_de_Chausse 5 #cc0000 +1er_tage 5 white + +[countries] +1 Entry 1 105 237 +2 Garage 1 206 312 +3 Laundry 1 230 219 +4 Rumpus_room 1 233 144 +5 Kitchen 1 149 109 +6 Dining_room 1 159 200 +7 Living_room 1 51 217 +8 TV_room 1 56 131 +9 Bart's_room 2 354 226 +10 Lisa's_room 2 505 233 +11 Homer_&_Marge's_room 2 610 221 +12 Homer_&_Marge's_closet 2 628 95 +13 Homer_et_Marge's_bathroom 2 543 76 +14 Maggie's_room 2 473 79 +15 Maggie's_closet 2 407 96 +16 Bathroom 2 347 104 +17 Hall 2 448 138 + +[borders] +1 7 6 17 +2 3 +3 2 4 +4 3 5 +5 4 6 8 +6 1 5 +7 1 8 +8 5 7 +9 17 +10 17 +11 17 12 13 +12 11 +13 11 +14 17 15 +15 14 +16 17 +17 1 9 10 11 14 16 diff --git a/src/main/java/project/app/warzone/Utilities/Maps/europe1.map b/src/main/java/project/app/warzone/Utilities/Maps/europe1.map new file mode 100644 index 0000000..f3ac97d --- /dev/null +++ b/src/main/java/project/app/warzone/Utilities/Maps/europe1.map @@ -0,0 +1,57 @@ +[continents] +North_Europe 5 red +East_Europe 4 magenta +South_Europe 5 green +West_Europe 3 blue + +[countries] +1 England 1 164 126 +2 Scotland 1 158 44 +3 N_Ireland 1 125 70 +4 Rep_Ireland 1 106 90 +5 Wales 1 141 109 +6 Belgium 1 213 153 +7 Netherlands 1 226 128 +8 Denmark 2 275 76 +9 Germany 2 261 149 +10 Poland 2 346 141 +11 Czech_Rep 2 308 173 +12 Slovakia 2 356 190 +13 Hungary 3 347 220 +14 Austria 3 306 210 +15 Switzerland 3 233 217 +16 Italy 3 264 249 +17 Sicily 3 294 363 +18 Sardinia 3 240 321 +19 Corsica 3 242 286 +20 Majorca 4 184 319 +21 France 4 176 202 +22 Spain 4 96 285 +23 Portugal 4 38 290 +24 Luxembourg 4 227 172 + +[borders] +1 8 21 6 7 5 2 3 4 +2 8 1 3 +3 1 2 +4 22 1 5 +5 1 4 +6 9 21 7 1 +7 9 6 1 +8 10 9 2 1 +9 15 14 11 10 8 7 6 +10 12 11 8 9 +11 14 12 9 10 +12 14 13 10 11 +13 14 12 +14 16 15 13 9 11 12 +15 16 14 9 21 +16 18 17 15 14 +17 18 16 +18 20 17 19 16 +19 20 18 +20 22 19 18 +21 22 15 6 1 +22 23 4 20 21 +23 22 +24 diff --git a/src/test/java/project/app/warzone/WarzoneApplicationTests.java b/src/test/java/project/app/warzone/WarzoneApplicationTests.java index c7c9f88..5c8e974 100644 --- a/src/test/java/project/app/warzone/WarzoneApplicationTests.java +++ b/src/test/java/project/app/warzone/WarzoneApplicationTests.java @@ -10,4 +10,6 @@ class WarzoneApplicationTests { void contextLoads() { } + + }