Updated the JavaDocs in multiple classes, to improve readability.

This commit is contained in:
Daniel Grigencha
2024-12-05 05:09:15 +01:00
parent 4fb848420b
commit e81aa67d36
3 changed files with 15 additions and 5 deletions

View File

@@ -7,7 +7,9 @@
*/ */
@Serializable @Serializable
public class JoinedLobbyMessage extends ClientMessage { public class JoinedLobbyMessage extends ClientMessage {
/**
* The name of the player that is joining the server.
*/
private final String name; private final String name;
/** /**

View File

@@ -20,12 +20,15 @@ public class RequestPlayCardMessage extends ClientMessage {
*/ */
private final UUID ownPieceIdentifier; private final UUID ownPieceIdentifier;
/**
* The identifier of the enemy piece.
*/
private final UUID enemyPieceIdentifier; private final UUID enemyPieceIdentifier;
/** /**
* Constructs a new RequestPlayCard instance. * 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 * @param ownPieceIdentifier the identifier of the piece
*/ */
public RequestPlayCardMessage(BonusCard card, UUID ownPieceIdentifier, UUID enemyPieceIdentifier) { public RequestPlayCardMessage(BonusCard card, UUID ownPieceIdentifier, UUID enemyPieceIdentifier) {
@@ -46,11 +49,11 @@ private RequestPlayCardMessage() {
/** /**
* Creates a new RequestPlayCard instance for a given bonus card. * 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 * @param enemyPieceIdentifier the identifier of the enemy piece
* @return a new RequestPlayCard instance * @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); 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 * @param ownPieceIdentifier the identifier of the piece
* @return a new RequestPlayCard instance * @return a new RequestPlayCard instance
*/ */
public static RequestPlayCardMessage requestPlayShield(UUID ownPieceIdentifier){ public static RequestPlayCardMessage requestPlayShield(UUID ownPieceIdentifier) {
return new RequestPlayCardMessage(BonusCard.SHIELD, ownPieceIdentifier, null); return new RequestPlayCardMessage(BonusCard.SHIELD, ownPieceIdentifier, null);
} }

View File

@@ -29,6 +29,11 @@ private SelectTSKMessage() {
color = null; 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() { public Color getColor() {
return color; return color;
} }