mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 19:33:40 +01:00
fixed GateField rent
This commit is contained in:
parent
aa86c25e7c
commit
14ceb9dc67
@ -372,7 +372,7 @@ public class Player implements FieldVisitor<Void>{
|
||||
public Void visit(GateField field) {
|
||||
if(field.getOwner() == null) {
|
||||
if (field.getPrice() <= accountBalance) getHandler().getLogic().send(this, new BuyPropertyRequest());
|
||||
} else {
|
||||
} else if (field.getOwner() != this){
|
||||
int rent = field.calcRent() * field.getOwner().getNumProp(field);
|
||||
|
||||
field.getOwner().earnMoney(rent);
|
||||
@ -487,8 +487,8 @@ public class Player implements FieldVisitor<Void>{
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
// private static int c = 0;
|
||||
|
||||
/**
|
||||
* Inner class for dice functionality in the game.
|
||||
* Rolls random dice values.
|
||||
@ -503,8 +503,8 @@ public class Player implements FieldVisitor<Void>{
|
||||
*/
|
||||
private static int rollDice() {
|
||||
return random.nextInt(6) + 1;
|
||||
|
||||
// c++;
|
||||
// return (c%2 == 0)? 3: 2;
|
||||
// if(c < 7) {
|
||||
// return 3;
|
||||
// } else {
|
||||
|
@ -11,7 +11,7 @@ public class GateField extends PropertyField{
|
||||
}
|
||||
|
||||
GateField(String name, int id) {
|
||||
super(name, id, 2000, 25);
|
||||
super(name, id, 2000, 250);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user