mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-24 21:39:44 +01:00
fixed buyProperty
This commit is contained in:
parent
74c3d925e6
commit
e7a6802488
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user