Merge remote-tracking branch 'origin/main'
# Conflicts: # src/ch/zhaw/catan/Siedler.java
This commit is contained in:
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" default="true" project-jdk-name="openjdk-17" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="openjdk-17" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -72,7 +72,7 @@ public class SiedlerBoard extends HexBoard<Config.Land, Settlement, Road, String
|
|||||||
*
|
*
|
||||||
* @return String of actual board.
|
* @return String of actual board.
|
||||||
*/
|
*/
|
||||||
public String getTextView() {
|
public String toString() {
|
||||||
SiedlerBoardTextView view = new SiedlerBoardTextView(this);
|
SiedlerBoardTextView view = new SiedlerBoardTextView(this);
|
||||||
for (Map.Entry<Point, Field> field : fields.entrySet()) {
|
for (Map.Entry<Point, Field> field : fields.entrySet()) {
|
||||||
view.setLowerFieldLabel(field.getKey(), field.getValue().getLabel());
|
view.setLowerFieldLabel(field.getKey(), field.getValue().getLabel());
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class SiedlerBoardTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLongestRoadSimple() {
|
public void testLongestRoadSimple() {
|
||||||
System.out.println(board.getTextView());
|
System.out.println(board.toString());
|
||||||
|
|
||||||
assertEquals(Config.Faction.BLUE, board.getLongestRoadFaction(factionList));
|
assertEquals(Config.Faction.BLUE, board.getLongestRoadFaction(factionList));
|
||||||
assertEquals(6, board.getLongestRoadLength());
|
assertEquals(6, board.getLongestRoadLength());
|
||||||
@@ -47,7 +47,7 @@ public class SiedlerBoardTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testLongestRoadWithInterrupt() {
|
public void testLongestRoadWithInterrupt() {
|
||||||
board.setCorner(new Point(4, 10), new Settlement(Config.Faction.RED, new Point(4, 10)));
|
board.setCorner(new Point(4, 10), new Settlement(Config.Faction.RED, new Point(4, 10)));
|
||||||
System.out.println(board.getTextView());
|
System.out.println(board.toString());
|
||||||
|
|
||||||
assertEquals(Config.Faction.BLUE, board.getLongestRoadFaction(factionList));
|
assertEquals(Config.Faction.BLUE, board.getLongestRoadFaction(factionList));
|
||||||
assertEquals(5, board.getLongestRoadLength());
|
assertEquals(5, board.getLongestRoadLength());
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public class SiedlerGameTest {
|
|||||||
@DisplayName("Test")
|
@DisplayName("Test")
|
||||||
public void TestHandle7() {
|
public void TestHandle7() {
|
||||||
SiedlerGame game = startGame();
|
SiedlerGame game = startGame();
|
||||||
|
//todo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ public class SiedlerGameTest {
|
|||||||
public void TestGameAfterSetupPhase() {
|
public void TestGameAfterSetupPhase() {
|
||||||
SiedlerGame game = gameAfterSetupPhase();
|
SiedlerGame game = gameAfterSetupPhase();
|
||||||
|
|
||||||
System.out.println(game.getBoard().getTextView());
|
System.out.println(game.getBoard().toString());
|
||||||
|
|
||||||
throwDiceSeveralTimes(game, 5, 5);
|
throwDiceSeveralTimes(game, 5, 5);
|
||||||
throwDiceSeveralTimes(game, 5, 5);
|
throwDiceSeveralTimes(game, 5, 5);
|
||||||
@@ -311,7 +311,7 @@ public class SiedlerGameTest {
|
|||||||
game.placeInitialRoad(secondRoad.first, secondRoad.second);
|
game.placeInitialRoad(secondRoad.first, secondRoad.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(game.getBoard().getTextView());
|
System.out.println(game.getBoard().toString());
|
||||||
|
|
||||||
return game;
|
return game;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user