mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-24 23:59:44 +01:00
rent calculation
This commit is contained in:
parent
44673fd57e
commit
fafa53ffb7
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user