fixed buyProperty

This commit is contained in:
Johannes Schmelz 2024-11-24 19:14:56 +01:00
parent 74c3d925e6
commit e7a6802488

View File

@ -168,6 +168,7 @@ public class Player implements FieldVisitor<Void>{
public void buyProperty(PropertyField property) {
if (property.getOwner() == null && accountBalance >= property.getPrice()) {
properties.add(property);
property.setOwner(this);
pay(property.getPrice());
}
}