mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 18:23:44 +01:00
foodfield rent calc
This commit is contained in:
parent
14ceb9dc67
commit
031ac52670
@ -352,10 +352,10 @@ public class Player implements FieldVisitor<Void>{
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user