changes in mainMethod
This commit is contained in:
parent
7b23ed5380
commit
7c84f7f600
|
@ -20,6 +20,7 @@ public class Siedler {
|
||||||
boolean running = true;
|
boolean running = true;
|
||||||
while (running){
|
while (running){
|
||||||
parser.playerTurn(game.getCurrentPlayerFaction());
|
parser.playerTurn(game.getCurrentPlayerFaction());
|
||||||
|
|
||||||
switch (parser.getAction()) {
|
switch (parser.getAction()) {
|
||||||
case NEXTPLAYER:
|
case NEXTPLAYER:
|
||||||
game.switchToNextPlayer();
|
game.switchToNextPlayer();
|
||||||
|
@ -37,8 +38,11 @@ public class Siedler {
|
||||||
game.buildRoad(parser.getPoint(), parser.getPoint());
|
game.buildRoad(parser.getPoint(), parser.getPoint());
|
||||||
break;
|
break;
|
||||||
case TRADEWITHBANK:
|
case TRADEWITHBANK:
|
||||||
Config.Resource toGive = parser.trade(true);
|
Config.Resource offer = parser.trade(true);
|
||||||
Config.Resource toGet = parser.trade(false);
|
Config.Resource want = parser.trade(false);
|
||||||
|
if(!game.tradeWithBankFourToOne(offer, want)){
|
||||||
|
parser.errorMessage();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case QUIT:
|
case QUIT:
|
||||||
running = false;
|
running = false;
|
||||||
|
|
Loading…
Reference in New Issue