update testLongestRoad
This commit is contained in:
parent
99eab9ad69
commit
3b721301fa
|
@ -185,6 +185,11 @@ public class SiedlerBoard extends HexBoard<Config.Land, Settlement, Road, String
|
|||
return longestRoadFaction;
|
||||
}
|
||||
|
||||
//todo javadoc
|
||||
public int getLongestRoadLenth() {
|
||||
return longestRoadLenth;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is recursive and adds all roads which belongs to a specific players and stringing together to a HashSet.
|
||||
* The length of the HashSet represents the length of the longest Road the player has.
|
||||
|
|
|
@ -37,8 +37,6 @@ public class SiedlerGameTest {
|
|||
*/
|
||||
@Test
|
||||
public void testLongestRoad() {
|
||||
HashMap<Config.Faction,Integer> currentLongestRoad = new HashMap<>();
|
||||
//currentLongestRoad.put(Config.Faction.RED,5);
|
||||
List<Config.Faction> factionList = Arrays.asList(Config.Faction.values());
|
||||
|
||||
SiedlerBoard board = new SiedlerBoard();
|
||||
|
@ -52,7 +50,7 @@ public class SiedlerGameTest {
|
|||
board.setEdge(new Point(4, 10), new Point(5, 9), new Road(Config.Faction.BLUE,new Point(4, 10),new Point(5, 9)));
|
||||
board.setCorner(new Point(3,7),new Settlement(Config.Faction.BLUE,new Point(3,7)));
|
||||
assertEquals(Config.Faction.BLUE, board.getLongestRoadFaction(factionList));
|
||||
//assertEquals(6,currentLongestRoad.get(Config.Faction.BLUE));
|
||||
assertEquals(6,board.getLongestRoadLenth());
|
||||
//todo prüfen ob länge Stimmt.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue