diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java index 01cf896..9518ded 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java @@ -13,10 +13,21 @@ public class BuildingProperty extends PropertyField { @Override protected int calcRent() { - if(!hotel) { - return rent*houses; - } else { - return rent*6; + if (hotel) { + return (int) Math.round(rent*4.95*2.93*2.67*1.35*1.26); + } + switch (houses) { + case 1: + return (int) Math.round(rent*4.95); + case 2: + return (int) Math.round(rent*4.95*2.93); + case 3: + return (int) Math.round(rent*4.95*2.93*2.67); + case 4: + return (int) Math.round(rent*4.95*2.93*2.67*1.35); + + default: + return rent; } }