rent calculation

This commit is contained in:
Johannes Schmelz 2024-11-13 23:49:37 +01:00
parent 44673fd57e
commit fafa53ffb7

View File

@ -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;
}
}