From 3b721301fadf9bbd9ca28dcb50be8cc73c56e985 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Fri, 10 Dec 2021 08:31:45 +0100 Subject: [PATCH] update testLongestRoad --- src/ch/zhaw/catan/SiedlerBoard.java | 5 +++++ test/ch/zhaw/catan/SiedlerGameTest.java | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ch/zhaw/catan/SiedlerBoard.java b/src/ch/zhaw/catan/SiedlerBoard.java index cb074ce..6a4cbb7 100644 --- a/src/ch/zhaw/catan/SiedlerBoard.java +++ b/src/ch/zhaw/catan/SiedlerBoard.java @@ -185,6 +185,11 @@ public class SiedlerBoard extends HexBoard currentLongestRoad = new HashMap<>(); - //currentLongestRoad.put(Config.Faction.RED,5); List 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. }