Merge remote-tracking branch 'origin/gui' into gui

This commit is contained in:
Yvonne Schmidt 2024-12-09 05:53:08 +01:00
commit c9e99ee9ff
3 changed files with 5 additions and 1 deletions

View File

@ -310,6 +310,8 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
} else if(msg.getKeyWord().equals("ReceivedRent")) {
playSound(Sound.MONEY_COLLECTED);
notifyListeners(new PopUpEvent("ReceivedRent", msg));
} else if (msg.getKeyWord().equals("aussetzen")) {
notifyListeners(new ButtonStatusEvent(false));
}
}

View File

@ -85,7 +85,7 @@ public class ServerGameLogic implements ClientInterpreter {
* @param player the Player to whom the message is sent
* @param msg the ServerMessage to send
*/
void send(Player player, ServerMessage msg) {
public void send(Player player, ServerMessage msg) {
if (player != null && msg != null) {
serverSender.send(player.getId(), msg);
LOGGER.log(Level.DEBUG, "Message sent to player {0}: {1}", player.getName(), msg.getClass().getSimpleName());

View File

@ -8,6 +8,7 @@ import java.util.Queue;
import pp.monopoly.game.server.Player;
import pp.monopoly.message.client.EndTurn;
import pp.monopoly.message.server.NotificationMessage;
public class DeckHelper{
@ -258,6 +259,7 @@ public class DeckHelper{
private void rueckstuferantrag(Player player) {
player.getHandler().getLogic().received(new EndTurn(), player.getId());
player.getHandler().getLogic().send(player, new NotificationMessage("aussetzen"));
}
private void hausfeierSturz(Player player) {