changes in mainMethod

This commit is contained in:
schrom01 2021-12-02 18:47:00 +01:00
parent 7b23ed5380
commit 7c84f7f600
1 changed files with 6 additions and 2 deletions

View File

@ -20,6 +20,7 @@ public class Siedler {
boolean running = true;
while (running){
parser.playerTurn(game.getCurrentPlayerFaction());
switch (parser.getAction()) {
case NEXTPLAYER:
game.switchToNextPlayer();
@ -37,8 +38,11 @@ public class Siedler {
game.buildRoad(parser.getPoint(), parser.getPoint());
break;
case TRADEWITHBANK:
Config.Resource toGive = parser.trade(true);
Config.Resource toGet = parser.trade(false);
Config.Resource offer = parser.trade(true);
Config.Resource want = parser.trade(false);
if(!game.tradeWithBankFourToOne(offer, want)){
parser.errorMessage();
}
break;
case QUIT:
running = false;