buyHouse complete

This commit is contained in:
Johannes Schmelz
2024-12-02 01:37:32 +01:00
parent 5172766216
commit add5dab611
3 changed files with 11 additions and 1 deletions

View File

@@ -99,6 +99,7 @@ public class BuyHouse extends Dialog {
AlterProperty msg = new AlterProperty("BuyHouse");
msg.setProperties(selectedProperties.stream().map(p -> app.getGameLogic().getBoardManager().getFieldByName(p).getId()).map(p -> (Integer) p).collect(Collectors.toSet()));
app.getGameLogic().send(msg);
close();
}));
// Center the popup
@@ -160,6 +161,7 @@ public class BuyHouse extends Dialog {
return boardManager.getPropertyFields(self.getProperties()).stream()
.filter(property -> property instanceof BuildingProperty)
.map(property -> (BuildingProperty) property)
.filter(property -> app.getGameLogic().getBoardManager().canBuild(property))
.collect(Collectors.toList());
}