From e81aa67d36e09a70dc23fd2260b7c175b5585f4e Mon Sep 17 00:00:00 2001 From: Daniel Grigencha Date: Thu, 5 Dec 2024 05:09:15 +0100 Subject: [PATCH] Updated the JavaDocs in multiple classes, to improve readability. --- .../pp/mdga/message/client/JoinedLobbyMessage.java | 4 +++- .../mdga/message/client/RequestPlayCardMessage.java | 11 +++++++---- .../java/pp/mdga/message/client/SelectTSKMessage.java | 5 +++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/JoinedLobbyMessage.java b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/JoinedLobbyMessage.java index 7b4f862a..c87704db 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/JoinedLobbyMessage.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/JoinedLobbyMessage.java @@ -7,7 +7,9 @@ */ @Serializable public class JoinedLobbyMessage extends ClientMessage { - + /** + * The name of the player that is joining the server. + */ private final String name; /** diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/RequestPlayCardMessage.java b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/RequestPlayCardMessage.java index 231a0d03..f9cc057b 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/RequestPlayCardMessage.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/RequestPlayCardMessage.java @@ -20,12 +20,15 @@ public class RequestPlayCardMessage extends ClientMessage { */ private final UUID ownPieceIdentifier; + /** + * The identifier of the enemy piece. + */ private final UUID enemyPieceIdentifier; /** * Constructs a new RequestPlayCard instance. * - * @param card the bonus card to be played + * @param card the bonus card to be played * @param ownPieceIdentifier the identifier of the piece */ public RequestPlayCardMessage(BonusCard card, UUID ownPieceIdentifier, UUID enemyPieceIdentifier) { @@ -46,11 +49,11 @@ private RequestPlayCardMessage() { /** * Creates a new RequestPlayCard instance for a given bonus card. * - * @param ownPieceIdentifier the identifier of the piece + * @param ownPieceIdentifier the identifier of the piece * @param enemyPieceIdentifier the identifier of the enemy piece * @return a new RequestPlayCard instance */ - public static RequestPlayCardMessage requestPlaySwap(UUID ownPieceIdentifier, UUID enemyPieceIdentifier){ + public static RequestPlayCardMessage requestPlaySwap(UUID ownPieceIdentifier, UUID enemyPieceIdentifier) { return new RequestPlayCardMessage(BonusCard.SWAP, ownPieceIdentifier, enemyPieceIdentifier); } @@ -60,7 +63,7 @@ public static RequestPlayCardMessage requestPlaySwap(UUID ownPieceIdentifier, UU * @param ownPieceIdentifier the identifier of the piece * @return a new RequestPlayCard instance */ - public static RequestPlayCardMessage requestPlayShield(UUID ownPieceIdentifier){ + public static RequestPlayCardMessage requestPlayShield(UUID ownPieceIdentifier) { return new RequestPlayCardMessage(BonusCard.SHIELD, ownPieceIdentifier, null); } diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/SelectTSKMessage.java b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/SelectTSKMessage.java index 846d8c4f..176f1dc5 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/SelectTSKMessage.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/SelectTSKMessage.java @@ -29,6 +29,11 @@ private SelectTSKMessage() { color = null; } + /** + * Gets the color associated with the TSK to be selected. + * + * @return the color associated with the TSK to be selected + */ public Color getColor() { return color; }