refactored ceremony message
This commit is contained in:
		@@ -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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -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.
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user