mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 18:23:44 +01:00
fixed testing env
This commit is contained in:
parent
2dbc727728
commit
4743a6882c
@ -18,6 +18,7 @@ import static pp.monopoly.Resources.lookup;
|
||||
import pp.monopoly.client.GameMusic;
|
||||
import pp.monopoly.client.GameSound;
|
||||
import pp.monopoly.client.MonopolyApp;
|
||||
import pp.monopoly.message.client.NotificationAnswer;
|
||||
import pp.dialog.Dialog;
|
||||
import pp.dialog.StateCheckboxModel;
|
||||
import pp.monopoly.notification.Sound;
|
||||
@ -60,6 +61,7 @@ public class SettingsMenu extends Dialog {
|
||||
|
||||
addChild(new Button("Zurück zum Spiel", new ElementId("button"))).addClickCommands(s -> ifTopDialog(() -> {
|
||||
this.close(); // Close the StartMenu dialog
|
||||
app.getGameLogic().send(new NotificationAnswer("hack"));
|
||||
app.getGameLogic().playSound(Sound.BUTTON);
|
||||
}));
|
||||
addChild(new Button("Beenden", new ElementId("button"))).addClickCommands(s -> ifTopDialog(() -> {
|
||||
|
@ -425,11 +425,11 @@ public class ServerGameLogic implements ClientInterpreter {
|
||||
} else if (msg.getA().equals("PayJail")) {
|
||||
playerHandler.getPlayerById(from).payBail();
|
||||
} else if(msg.getA().equals("hack")) {
|
||||
System.out.println("HAck ausgeführt");
|
||||
for (BuildingProperty bp : boardManager.getPropertyFields( List.of(1,3)).stream().filter(p -> p instanceof BuildingProperty).map(p -> (BuildingProperty) p).collect(Collectors.toList())) {
|
||||
bp.setOwner(playerHandler.getPlayerById(0));
|
||||
playerHandler.getPlayerById(0).addProperty(bp.getId());
|
||||
}
|
||||
playerHandler.getPlayerAtIndex(0).earnMoney(20000);
|
||||
}
|
||||
|
||||
updateAllPlayers();
|
||||
|
Loading…
Reference in New Issue
Block a user