From 7e9fa8e6a878c4a6addc56c1023bc0e24030223c Mon Sep 17 00:00:00 2001 From: schrom01 Date: Fri, 10 Dec 2021 12:13:39 +0100 Subject: [PATCH] Fix Method soutDistribution in SiedlerGameTest --- test/ch/zhaw/catan/SiedlerGameTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/ch/zhaw/catan/SiedlerGameTest.java b/test/ch/zhaw/catan/SiedlerGameTest.java index a79fe38..51cdc21 100644 --- a/test/ch/zhaw/catan/SiedlerGameTest.java +++ b/test/ch/zhaw/catan/SiedlerGameTest.java @@ -229,15 +229,17 @@ public class SiedlerGameTest { public void TestGameAfterSetupPhase() { SiedlerGame game = gameAfterSetupPhase(); + System.out.println(game.getBoard().getTextView()); + throwDiceSeveralTimes(game, 5, 5); throwDiceSeveralTimes(game, 5, 5); throwDiceSeveralTimes(game, 5, 5); throwDiceSeveralTimes(game, 5, 5); throwDiceSeveralTimes(game, 5, 5); - game.switchToNextPlayer(); + //game.switchToNextPlayer(); - throwDiceSeveralTimes(game, 6, 5); + //throwDiceSeveralTimes(game, 6, 5); //throwDiceSeveralTimes(game, 6, 5); //throwDiceSeveralTimes(game, 6, 5); //throwDiceSeveralTimes(game, 6, 5); @@ -259,9 +261,9 @@ public class SiedlerGameTest { //TEMPORARY METHOD, WILL BE REMOVED SOON private static void soutDistribution(SiedlerGame game) { System.out.println("\n\nVerteilung \n\n"); - for (Config.Faction faction: game.getPlayerFactions()) { + for (int i = 0 ; i < game.getPlayerFactions().size(); i++) { HashMap resources = game.getCurrentPlayerResource(); - System.out.println(faction.toString() + "\n"); + System.out.println(game.getCurrentPlayerFaction().toString() + "\n"); System.out.println(" BRICK " + resources.get(Config.Resource.BRICK).toString()); System.out.println(" GRAIN " + resources.get(Config.Resource.GRAIN)); System.out.println(" LUMBER " + resources.get(Config.Resource.LUMBER));