From ab5cece1b33349b9b0176e16dbb6eb6358b9903d Mon Sep 17 00:00:00 2001 From: Daniel Grigencha Date: Wed, 4 Dec 2024 02:42:57 +0100 Subject: [PATCH] Updated 'StartGameMessage' class. Updated the 'StartGameMessage' class by removing the unused 'forceStartGame' attribute from it. --- .../mdga/message/client/StartGameMessage.java | 46 ++++++------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/StartGameMessage.java b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/StartGameMessage.java index 4436225d..58007090 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/StartGameMessage.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/StartGameMessage.java @@ -7,39 +7,11 @@ */ @Serializable public class StartGameMessage extends ClientMessage { - - private final boolean forceStartGame; - - public StartGameMessage(boolean forceStartGame){ + /** + * Constructor. + */ + public StartGameMessage() { super(); - this.forceStartGame = forceStartGame; - } - - /** - * Constructs a new ForceStartGame message. - */ - private StartGameMessage() { - super(); - forceStartGame = false; - } - - /** - * Gets whether the game should be force started. - * - * @return whether the game should be force started - */ - public boolean isForceStartGame() { - return forceStartGame; - } - - /** - * Returns a string representation of this message. - * - * @return a string representation of this message - */ - @Override - public String toString() { - return "ForceStartGame{}"; } /** @@ -52,4 +24,14 @@ public String toString() { public void accept(ClientInterpreter interpreter, int from) { interpreter.received(this, from); } + + /** + * This method will be used to return all necessary information of StartGameMessage in a more readable way. + * + * @return information as a String. + */ + @Override + public String toString() { + return "StartGameMessage{}"; + } }