From f60b65af83f537374bedd20cf280a167984f488a Mon Sep 17 00:00:00 2001 From: schrom01 Date: Fri, 3 Dec 2021 08:34:48 +0100 Subject: [PATCH 1/2] fixed Error in Main Method --- src/ch/zhaw/catan/Siedler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ch/zhaw/catan/Siedler.java b/src/ch/zhaw/catan/Siedler.java index df3fc8d..ca591ef 100644 --- a/src/ch/zhaw/catan/Siedler.java +++ b/src/ch/zhaw/catan/Siedler.java @@ -30,14 +30,14 @@ public class Siedler { switch (parser.getAction()) { case NEXTPLAYER: Config.Faction winner = game.getWinner(); - if(winner == null) { + if(winner == null && false) { //todo remove false game.switchToNextPlayer(); diceThrown = false; - break; } else { - parser.displayWinnertext(winner); + parser.displayWinnertext(game.getCurrentPlayerFaction());//todo replace with winner running = false; } + break; case BUILDSETTLEMENT: parser.giveCoordinatesForStructures(Config.Structure.SETTLEMENT); game.buildSettlement(parser.getPoint()); From 1e49424b9ce03bd518ac28396b85c106ef62498f Mon Sep 17 00:00:00 2001 From: schrom01 Date: Fri, 3 Dec 2021 08:35:37 +0100 Subject: [PATCH 2/2] fixed Error in Main Method --- src/ch/zhaw/catan/Siedler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch/zhaw/catan/Siedler.java b/src/ch/zhaw/catan/Siedler.java index ca591ef..d97cdb8 100644 --- a/src/ch/zhaw/catan/Siedler.java +++ b/src/ch/zhaw/catan/Siedler.java @@ -30,11 +30,11 @@ public class Siedler { switch (parser.getAction()) { case NEXTPLAYER: Config.Faction winner = game.getWinner(); - if(winner == null && false) { //todo remove false + if(winner == null) { game.switchToNextPlayer(); diceThrown = false; } else { - parser.displayWinnertext(game.getCurrentPlayerFaction());//todo replace with winner + parser.displayWinnertext(winner); running = false; } break;