mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +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) {
|
public Void visit(FoodField field) {
|
||||||
if(field.getOwner() == null) {
|
if(field.getOwner() == null) {
|
||||||
if (field.getPrice() <= accountBalance) getHandler().getLogic().send(this, new BuyPropertyRequest());
|
if (field.getPrice() <= accountBalance) getHandler().getLogic().send(this, new BuyPropertyRequest());
|
||||||
} else {
|
} else if (field.getOwner() != this){
|
||||||
int factor = 4;
|
int factor = 40;
|
||||||
if (field.getOwner().getNumProp(field) == 2) {
|
if (field.getOwner().getNumProp(field) == 2) {
|
||||||
factor = 10;
|
factor = 100;
|
||||||
}
|
}
|
||||||
int rent = rollResult.calcTotal()*factor;
|
int rent = rollResult.calcTotal()*factor;
|
||||||
field.getOwner().earnMoney(rent);
|
field.getOwner().earnMoney(rent);
|
||||||
|
Loading…
Reference in New Issue
Block a user