diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/message/server/ServerStartGameMessage.java b/Projekte/mdga/model/src/main/java/pp/mdga/message/server/ServerStartGameMessage.java index ac448825..37c22e1e 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/message/server/ServerStartGameMessage.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/message/server/ServerStartGameMessage.java @@ -1,17 +1,33 @@ package pp.mdga.message.server; import com.jme3.network.serializing.Serializable; +import pp.mdga.game.Board; /** * A message indicating that the game shall start. */ @Serializable public class ServerStartGameMessage extends ServerMessage { + /** + * Create ServerStartGameMessage attributes. + */ + private final Board board; + /** * Constructs a new ServerStartGame instance. */ public ServerStartGameMessage() { super(); + this.board = null; + } + + /** + * Constructor. + * + * @param board as the complete board of this game as a Board object. + */ + public ServerStartGameMessage(Board board) { + this.board = board; } /** @@ -24,6 +40,15 @@ public void accept(ServerInterpreter interpreter) { interpreter.received(this); } + /** + * This method will be used to return board attribute of ServerStartGameMessage class. + * + * @return board as a Board object. + */ + public Board getBoard() { + return this.board; + } + /** * Returns a string representation of this message. *