From 031ac52670af5b869ab72444cf4ea606b415ae9c Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Tue, 3 Dec 2024 00:40:43 +0100 Subject: [PATCH] foodfield rent calc --- .../model/src/main/java/pp/monopoly/game/server/Player.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java index 2bd043b..e55b1c6 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java @@ -352,10 +352,10 @@ public class Player implements FieldVisitor{ public Void visit(FoodField field) { if(field.getOwner() == null) { if (field.getPrice() <= accountBalance) getHandler().getLogic().send(this, new BuyPropertyRequest()); - } else { - int factor = 4; + } else if (field.getOwner() != this){ + int factor = 40; if (field.getOwner().getNumProp(field) == 2) { - factor = 10; + factor = 100; } int rent = rollResult.calcTotal()*factor; field.getOwner().earnMoney(rent);