mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 03:46:15 +01:00
disable buttons when having to pause one round
This commit is contained in:
parent
38699ac07a
commit
6cdf0eee53
@ -310,6 +310,8 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
|
|||||||
} else if(msg.getKeyWord().equals("ReceivedRent")) {
|
} else if(msg.getKeyWord().equals("ReceivedRent")) {
|
||||||
playSound(Sound.MONEY_COLLECTED);
|
playSound(Sound.MONEY_COLLECTED);
|
||||||
notifyListeners(new PopUpEvent("ReceivedRent", msg));
|
notifyListeners(new PopUpEvent("ReceivedRent", msg));
|
||||||
|
} else if (msg.getKeyWord().equals("aussetzen")) {
|
||||||
|
notifyListeners(new ButtonStatusEvent(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public class ServerGameLogic implements ClientInterpreter {
|
|||||||
* @param player the Player to whom the message is sent
|
* @param player the Player to whom the message is sent
|
||||||
* @param msg the ServerMessage to send
|
* @param msg the ServerMessage to send
|
||||||
*/
|
*/
|
||||||
void send(Player player, ServerMessage msg) {
|
public void send(Player player, ServerMessage msg) {
|
||||||
if (player != null && msg != null) {
|
if (player != null && msg != null) {
|
||||||
serverSender.send(player.getId(), msg);
|
serverSender.send(player.getId(), msg);
|
||||||
LOGGER.log(Level.DEBUG, "Message sent to player {0}: {1}", player.getName(), msg.getClass().getSimpleName());
|
LOGGER.log(Level.DEBUG, "Message sent to player {0}: {1}", player.getName(), msg.getClass().getSimpleName());
|
||||||
|
@ -8,6 +8,7 @@ import java.util.Queue;
|
|||||||
|
|
||||||
import pp.monopoly.game.server.Player;
|
import pp.monopoly.game.server.Player;
|
||||||
import pp.monopoly.message.client.EndTurn;
|
import pp.monopoly.message.client.EndTurn;
|
||||||
|
import pp.monopoly.message.server.NotificationMessage;
|
||||||
|
|
||||||
public class DeckHelper{
|
public class DeckHelper{
|
||||||
|
|
||||||
@ -258,6 +259,7 @@ public class DeckHelper{
|
|||||||
|
|
||||||
private void rueckstuferantrag(Player player) {
|
private void rueckstuferantrag(Player player) {
|
||||||
player.getHandler().getLogic().received(new EndTurn(), player.getId());
|
player.getHandler().getLogic().received(new EndTurn(), player.getId());
|
||||||
|
player.getHandler().getLogic().send(player, new NotificationMessage("aussetzen"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hausfeierSturz(Player player) {
|
private void hausfeierSturz(Player player) {
|
||||||
|
Loading…
Reference in New Issue
Block a user