refactored ceremony message

This commit is contained in:
Fleischer Hanno
2024-11-24 22:20:04 +01:00
parent 599b3e8f47
commit ed47883281
3 changed files with 5 additions and 7 deletions

View File

@@ -6,11 +6,11 @@
* A message sent by the server to indicate the beginning of the ceremony.
*/
@Serializable
public class Ceremony extends ServerMessage {
public class CeremonyMessage extends ServerMessage {
/**
* Constructs a new Ceremony instance.
*/
public Ceremony() {
public CeremonyMessage() {
super();
}

View File

@@ -31,7 +31,7 @@ public interface ServerInterpreter {
*
* @param msg the Ceremony message received
*/
void received(Ceremony msg);
void received(CeremonyMessage msg);
/**
* Handles a Dice message received from the server.

View File

@@ -1,10 +1,8 @@
package pp.mdga.server;
import pp.mdga.client.Spectator;
import pp.mdga.game.Player;
import pp.mdga.message.server.ActivePlayer;
import pp.mdga.message.server.Ceremony;
import pp.mdga.message.server.EndOfTurn;
import pp.mdga.message.server.CeremonyMessage;
public class Turn extends ServerState {
private final TurnStateMachine turnStateMachine = new TurnStateMachine(this, logic);
@@ -25,7 +23,7 @@ public void exit() {
// }
if (logic.getGame().getPlayers().size() == 1) {
broadcastUpdate(new Ceremony());
broadcastUpdate(new CeremonyMessage());
this.getParent().getParent().exit();
} else {
// todo: next player