From 212acc0fc508c12bfd091eaedbbd2c4d65811257 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Sat, 4 Dec 2021 15:39:25 +0100 Subject: [PATCH] fix payout in Method placeInitialSettlement in SiedlerGame --- src/ch/zhaw/catan/SiedlerGame.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ch/zhaw/catan/SiedlerGame.java b/src/ch/zhaw/catan/SiedlerGame.java index ccc8d2e..e4d392f 100644 --- a/src/ch/zhaw/catan/SiedlerGame.java +++ b/src/ch/zhaw/catan/SiedlerGame.java @@ -152,9 +152,11 @@ public class SiedlerGame { return false; } board.setCorner(position, new Settlement(allPlayers.get(activePlayer).getFaction())); - List lands = board.getLandsForCorner(position); - for (Config.Land land:lands){ - allPlayers.get(activePlayer).addResource(land.getResource(), 1); + if(payout){ + List lands = board.getLandsForCorner(position); + for (Config.Land land:lands){ + allPlayers.get(activePlayer).addResource(land.getResource(), 1); + } } return true; }