fixed minor refactoring issues and removed import of ch.zhaw.catan in SiedlerBoard and used as package.

This commit is contained in:
Leonardo Brandenberger
2021-12-09 18:18:10 +01:00
parent 187302afd5
commit afd874bafa
8 changed files with 40 additions and 46 deletions
+6 -6
View File
@@ -29,7 +29,7 @@ public class Siedler {
boolean diceThrown = false;
while (running) {
Config.Faction currentPlayerFaction = game.getCurrentPlayerFaction();
parser.displayGameboard(game.getBoard().getTextView()); //todo jedesmal ausgeben? oder nur wenn neuer Spieler oder separater Befehl?
parser.displayGameboard(game.getBoard().getTextView()); //TODO Every turn or separate command?
parser.playerTurn(currentPlayerFaction);
if (!diceThrown) {
throwDice(parser, game);
@@ -37,23 +37,23 @@ public class Siedler {
}
parser.displayPlayerInfo(game.getCurrentPlayerResource(), game.getCurrentPlayerWinPoints());
switch (parser.getAction()) {
case NEXTPLAYER:
case NEXT_PLAYER:
if (caseNextPlayer(parser, game)) {
running = false;
} else {
diceThrown = false;
}
break;
case BUILDSETTLEMENT:
case BUILD_SETTLEMENT:
caseBuildStructure(parser, game, Config.Structure.SETTLEMENT);
break;
case BUILDCITY:
case BUILD_CITY:
caseBuildStructure(parser, game, Config.Structure.CITY);
break;
case BUILDROAD:
case BUILD_ROAD:
caseBuildStructure(parser, game, Config.Structure.ROAD);
break;
case TRADEWITHBANK:
case TRADE_WITH_BANK:
caseTradeWithBank(parser, game);
break;
case QUIT: