added leave button logic to interrupt state

This commit is contained in:
Hanno Fleischer
2024-12-13 11:14:14 +01:00
parent b891e78647
commit e3ec2aaba8

View File

@@ -1,7 +1,9 @@
package pp.mdga.client;
import pp.mdga.message.client.ForceContinueGameMessage;
import pp.mdga.message.client.LeaveGameMessage;
import pp.mdga.message.server.ResumeGameMessage;
import pp.mdga.notification.StartDialogNotification;
public class InterruptState extends ClientState {
@@ -61,6 +63,13 @@ public void selectResume() {
}
}
@Override
public void selectLeave() {
logic.send(new LeaveGameMessage());
logic.addNotification(new StartDialogNotification());
logic.setState(logic.getDialogs());
}
/**
* The server resumes the game
*