diff --git a/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/GuiHandler.java b/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/GuiHandler.java index 8393653f..153221d9 100644 --- a/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/GuiHandler.java +++ b/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/GuiHandler.java @@ -7,6 +7,7 @@ import com.jme3.texture.Texture2D; import pp.mdga.client.MdgaApp; import pp.mdga.game.Color; +import pp.mdga.game.BonusCard; import java.util.List; @@ -70,7 +71,7 @@ public void hideDice() { cardLayerHandler.hideDice(); } - public void addCard(pp.mdga.game.BonusCard card) { + public void addCard(BonusCard card) { cardLayerHandler.addCard(card); } @@ -78,7 +79,7 @@ public void clearSelectableCards() { cardLayerHandler.clearSelectableCards(); } - public void setSelectableCards(List select) { + public void setSelectableCards(List select) { cardLayerHandler.setSelectableCards(select); } diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/AcquireCardNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/AcquireCardNotification.java index 5a4afff7..8d658084 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/AcquireCardNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/AcquireCardNotification.java @@ -7,13 +7,20 @@ /** * Notification that is sent when a card is acquired. */ -public class AcquireCardNotification extends Notification{ +public class AcquireCardNotification extends Notification { + /** + * The id of the card that was acquired. + */ + private final UUID cardId; - private UUID cardId; - private BonusCard bonusCard; + /** + * The bonus card that was acquired. + */ + private final BonusCard bonusCard; /** * Constructor. + * * @param cardId The id of the card that was acquired. */ public AcquireCardNotification(BonusCard bonusCard, UUID cardId) { @@ -23,6 +30,7 @@ public AcquireCardNotification(BonusCard bonusCard, UUID cardId) { /** * Get the id of the card that was acquired. + * * @return The id of the card that was acquired. */ public UUID getCardId() { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ActivePlayerNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ActivePlayerNotification.java index 4efdb343..171be0c2 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ActivePlayerNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ActivePlayerNotification.java @@ -6,12 +6,16 @@ * Notification that the active player has changed */ public class ActivePlayerNotification extends Notification { - /** * The color of the active player */ - private Color color; + private final Color color; + /** + * Constructor. + * + * @param color the color of the active player + */ public ActivePlayerNotification(Color color) { this.color = color; } diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/CeremonyNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/CeremonyNotification.java index f7210f69..6865f4ca 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/CeremonyNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/CeremonyNotification.java @@ -7,7 +7,7 @@ /** * Class CeremonyNotification * Represents a notification for a ceremony in the game. - * + *

* Index mapping: * index = 0 ==> winner * index = 1 ==> 2nd @@ -16,6 +16,9 @@ * index = 4 ==> total */ public class CeremonyNotification extends Notification { + /** + * Attributes. + */ private ArrayList colors; private ArrayList names; private ArrayList piecesThrown; @@ -40,8 +43,6 @@ public CeremonyNotification() { this.bonusNodes = new ArrayList<>(); } - // Getters and Setters - /** * @return the list of colors */ diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/DiceNowNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/DiceNowNotification.java index 68064cfe..8780f636 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/DiceNowNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/DiceNowNotification.java @@ -4,7 +4,6 @@ * Notification that the dice is now. */ public class DiceNowNotification extends Notification { - /** * Constructor. */ diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/DicingNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/DicingNotification.java index 4e9f3145..b2254605 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/DicingNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/DicingNotification.java @@ -5,12 +5,15 @@ /** * Notification that is sent when a player has diced. */ -public class DicingNotification extends Notification{ - - private Color color; +public class DicingNotification extends Notification { + /** + * The color of the player that diced. + */ + private final Color color; /** * Constructor. + * * @param color The color of the player that diced. */ public DicingNotification(Color color) { @@ -19,6 +22,7 @@ public DicingNotification(Color color) { /** * Get the color of the player that diced. + * * @return The color of the player that diced. */ public Color getColor() { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/DrawCardNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/DrawCardNotification.java index 5114fd15..3540d810 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/DrawCardNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/DrawCardNotification.java @@ -6,14 +6,20 @@ /** * Notification that a card has been drawn */ -public class DrawCardNotification extends Notification { +public class DrawCardNotification extends Notification { + /** + * The color of the player who drew the card + */ + private final Color color; - private Color color; - private BonusCard card; + /** + * The card that was drawn + */ + private final BonusCard card; /** * @param color the color of the player who drew the card - * @param card the card that was drawn + * @param card the card that was drawn */ public DrawCardNotification(Color color, BonusCard card) { this.color = color; diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/GameNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/GameNotification.java index d1864bbd..91fc5aea 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/GameNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/GameNotification.java @@ -3,7 +3,7 @@ /** * GameNotification class */ -public class GameNotification extends Notification{ +public class GameNotification extends Notification { /** * Constructor */ diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/HomeMoveNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/HomeMoveNotification.java index ffa7d2e1..1b222e62 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/HomeMoveNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/HomeMoveNotification.java @@ -6,14 +6,20 @@ * Notification that a piece has moved to a home. */ public class HomeMoveNotification extends Notification { + /** + * The unique identifier of the piece. + */ + private final UUID pieceId; - private UUID pieceId; - private int homeIndex; + /** + * The index of the home position. + */ + private final int homeIndex; /** * Constructor. * - * @param pieceId the piece id + * @param pieceId the piece id * @param homeIndex the home index */ public HomeMoveNotification(UUID pieceId, int homeIndex) { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/InterruptNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/InterruptNotification.java index bb8fb784..ef1543b0 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/InterruptNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/InterruptNotification.java @@ -6,8 +6,10 @@ * Notification that a card has been drawn */ public class InterruptNotification extends Notification { - - private Color color; + /** + * The color of the player who disconnected + */ + private final Color color; /** * @param color the color of the player who disconnected diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/LobbyDialogNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/LobbyDialogNotification.java index dcea5094..604af4f8 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/LobbyDialogNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/LobbyDialogNotification.java @@ -3,10 +3,5 @@ /** * Notification that a dialog has been started */ -public class LobbyDialogNotification extends Notification{ - /** - * Constructor - */ - public LobbyDialogNotification() { - } +public class LobbyDialogNotification extends Notification { } diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/MovePieceNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/MovePieceNotification.java index 610a9182..455c6baa 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/MovePieceNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/MovePieceNotification.java @@ -1,14 +1,11 @@ package pp.mdga.notification; -import pp.mdga.game.Color; - import java.util.UUID; /** * Notification that a piece has been moved. */ public class MovePieceNotification extends Notification { - /** * The unique identifier of the piece being moved. */ diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/NoShieldNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/NoShieldNotification.java index e17d0b33..8c7fa970 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/NoShieldNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/NoShieldNotification.java @@ -6,8 +6,10 @@ * Notification that a piece has no shield. */ public class NoShieldNotification extends Notification{ - - private UUID pieceId; + /** + * The id of the piece that has no shield. + */ + private final UUID pieceId; /** * Constructor. diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/Notification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/Notification.java index 3f8be5da..ee41c6dd 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/Notification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/Notification.java @@ -1,4 +1,7 @@ package pp.mdga.notification; +/** + * Represents a notification that can be sent to a player. + */ public abstract class Notification { } diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/PlayCardNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/PlayCardNotification.java index dd9cf9d4..9d78eac2 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/PlayCardNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/PlayCardNotification.java @@ -7,14 +7,21 @@ * Notification that a card has been played. */ public class PlayCardNotification extends Notification { + /** + * The color of the player that played the card. + */ + private final Color color; - private Color color; - private BonusCard card; + /** + * The card that was played. + */ + private final BonusCard card; /** * Constructor. + * * @param color the color of the player that played the card. - * @param card the card that was played. + * @param card the card that was played. */ public PlayCardNotification(Color color, BonusCard card) { this.color = color; @@ -23,6 +30,7 @@ public PlayCardNotification(Color color, BonusCard card) { /** * Get the color of the player that played the card. + * * @return the color of the player that played the card. */ public Color getColor() { @@ -31,6 +39,7 @@ public Color getColor() { /** * Get the card that was played. + * * @return the card that was played. */ public BonusCard getCard() { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/PlayerInGameNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/PlayerInGameNotification.java index 57552a0c..db660d28 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/PlayerInGameNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/PlayerInGameNotification.java @@ -9,17 +9,28 @@ * Notification that a player is in the game. */ public class PlayerInGameNotification extends Notification { + /** + * The color of the player that is in the game. + */ + private final Color color; - private Color color; - private String name; - private List piecesList; + /** + * The name of the player that is in the game. + */ + private final String name; + + /** + * The list of piece IDs associated with the player. + */ + private final List piecesList; /** * Constructor. + * * @param color the color of the player that is in the game. - * @param name the name of the player that is in the game. + * @param name the name of the player that is in the game. */ - public PlayerInGameNotification(Color color, List piecesList, String name) { + public PlayerInGameNotification(Color color, List piecesList, String name) { this.color = color; this.name = name; this.piecesList = piecesList; @@ -27,6 +38,7 @@ public PlayerInGameNotification(Color color, List piecesList, String name /** * Get the color of the player that is in the game. + * * @return the color of the player that is in the game. */ public Color getColor() { @@ -35,12 +47,18 @@ public Color getColor() { /** * Get the name of the player that is in the game. + * * @return the name of the player that is in the game. */ public String getName() { return name; } + /** + * Get the list of piece IDs associated with the player. + * + * @return the list of piece IDs associated with the player. + */ public List getPiecesList() { return piecesList; } diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ResumeNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ResumeNotification.java index 5ef4bd34..f15cacd7 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ResumeNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ResumeNotification.java @@ -6,11 +6,14 @@ * Notification that a player is in the game. */ public class ResumeNotification extends Notification { - - private Color color; + /** + * The color of the player that is in the game. + */ + private final Color color; /** * Constructor. + * * @param color the color of the player that is in the game. */ public ResumeNotification(Color color) { @@ -19,6 +22,7 @@ public ResumeNotification(Color color) { /** * Get the color of the player that is in the game. + * * @return the color of the player that is in the game. */ public Color getColor() { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/RollDiceNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/RollDiceNotification.java index 3f778d3f..7c233a36 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/RollDiceNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/RollDiceNotification.java @@ -5,16 +5,27 @@ /** * Notification that a die has been rolled. */ -public class RollDiceNotification extends Notification{ +public class RollDiceNotification extends Notification { + /** + * The color of the player that rolled the die. + */ + private final Color color; - private Color color; - private int eyes; - private int moveNumber; + /** + * The number of eyes that were rolled. + */ + private final int eyes; + + /** + * The number of the move that was made. + */ + private final int moveNumber; /** * Constructor. - * @param color the color of the player that rolled the die. - * @param eyes the number of eyes that were rolled. + * + * @param color the color of the player that rolled the die. + * @param eyes the number of eyes that were rolled. * @param moveNumber the number of the move that was made. */ public RollDiceNotification(Color color, int eyes, int moveNumber) { @@ -25,6 +36,7 @@ public RollDiceNotification(Color color, int eyes, int moveNumber) { /** * Get the color of the player that rolled the die. + * * @return the color of the player that rolled the die. */ public Color getColor() { @@ -33,6 +45,7 @@ public Color getColor() { /** * Get the number of eyes that were rolled. + * * @return the number of eyes that were rolled. */ public int getEyes() { @@ -41,6 +54,7 @@ public int getEyes() { /** * Get the number of the move that was made. + * * @return the number of the move that was made. */ public int getMoveNumber() { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableCardsNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableCardsNotification.java index 308edce2..efcbc37e 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableCardsNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableCardsNotification.java @@ -7,8 +7,10 @@ * Notification that contains a list of cards that the player can choose from. */ public class SelectableCardsNotification extends Notification { - - private List cards; + /** + * The list of cards that the player can choose from. + */ + private final List cards; /** * Constructor. diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableMoveNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableMoveNotification.java index cd7fe627..ce1ca590 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableMoveNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableMoveNotification.java @@ -6,8 +6,7 @@ /** * Notification for selecting pieces and their possible moves. */ -public class SelectableMoveNotification extends Notification{ - +public class SelectableMoveNotification extends Notification { /** * List of UUIDs representing the pieces that can be moved based on the dice roll. */ @@ -16,7 +15,7 @@ public class SelectableMoveNotification extends Notification{ /** * List of integers representing the target nodes the pieces can move to. */ - private final List moveIndexe; + private final List moveIndices; /** * List of booleans indicating whether the corresponding target nodes are in the home area. @@ -28,12 +27,12 @@ public class SelectableMoveNotification extends Notification{ * Constructs a notification for selectable piece moves. * * @param pieces the list of pieces that can be moved - * @param moveIndexe the list of target nodes for the moves + * @param moveIndices the list of target nodes for the moves * @param homeMoves the list indicating if the target nodes are in the home area */ - public SelectableMoveNotification(List pieces, List moveIndexe, List homeMoves) { + public SelectableMoveNotification(List pieces, List moveIndices, List homeMoves) { this.pieces = pieces; - this.moveIndexe = moveIndexe; + this.moveIndices = moveIndices; this.homeMoves = homeMoves; } @@ -51,8 +50,8 @@ public List getPieces() { * * @return a list of integers representing the target nodes */ - public List getMoveIndexe() { - return moveIndexe; + public List getMoveIndices() { + return moveIndices; } /** diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableSwapNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableSwapNotification.java index b7102bd7..cdd51780 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableSwapNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/SelectableSwapNotification.java @@ -6,8 +6,7 @@ /** * Notification for selecting pieces for swapcard. */ -public class SelectableSwapNotification extends Notification{ - +public class SelectableSwapNotification extends Notification { /** * List of UUIDs representing the player's own pieces available for selection. */ diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ShieldActiveNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ShieldActiveNotification.java index 0cb6c15b..7d17b8eb 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ShieldActiveNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ShieldActiveNotification.java @@ -5,9 +5,11 @@ /** * This class will be used to hold all ShieldActiveNotification relevant data. */ -public class ShieldActiveNotification extends Notification{ - - private UUID pieceId; +public class ShieldActiveNotification extends Notification { + /** + * The pieceId + */ + private final UUID pieceId; /** * This constructor is used to create a new ShieldActiveNotification diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ShieldSuppressedNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ShieldSuppressedNotification.java index ce7f7a8f..78d6b068 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ShieldSuppressedNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ShieldSuppressedNotification.java @@ -6,8 +6,10 @@ * This class will be used to hold all ShieldSuppressedNotification relevant data. */ public class ShieldSuppressedNotification extends Notification { - - private UUID pieceId; + /** + * The pieceId + */ + private final UUID pieceId; /** * This constructor is used to create a new ShieldSuppressedNotification diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/StartDialogNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/StartDialogNotification.java index 3e72cc29..380246c0 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/StartDialogNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/StartDialogNotification.java @@ -3,10 +3,5 @@ /** * Notification that a dialog has been started */ -public class StartDialogNotification extends Notification{ - /** - * Constructor - */ - public StartDialogNotification() { - } +public class StartDialogNotification extends Notification { } diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/SwapPieceNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/SwapPieceNotification.java index c66597b0..c6095175 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/SwapPieceNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/SwapPieceNotification.java @@ -6,23 +6,31 @@ * Notification that two pieces have been swapped. */ public class SwapPieceNotification extends Notification { + /** + * The UUID of the first piece that has been swapped. + */ + private final UUID firstPiece; - private UUID firstPiece; - private UUID secondPiece; + /** + * The UUID of the second piece that has been swapped. + */ + private final UUID secondPiece; /** * Constructor. - * @param firstPiece the UUID of the first piece that has been swapped. + * + * @param firstPiece the UUID of the first piece that has been swapped. * @param secondPiece the UUID of the second piece that has been swapped. */ public SwapPieceNotification(UUID firstPiece, UUID secondPiece) { - assert(!firstPiece.equals(secondPiece)); + assert (!firstPiece.equals(secondPiece)); this.firstPiece = firstPiece; this.secondPiece = secondPiece; } /** * Get the UUID of the first piece that has been swapped. + * * @return the UUID of the first piece that has been swapped. */ public UUID getFirstPiece() { @@ -31,6 +39,7 @@ public UUID getFirstPiece() { /** * Get the UUID of the second piece that has been swapped. + * * @return the UUID of the second piece that has been swapped. */ public UUID getSecondPiece() { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ThrowPieceNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ThrowPieceNotification.java index c99b079e..9b0ddd28 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/ThrowPieceNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/ThrowPieceNotification.java @@ -1,12 +1,15 @@ package pp.mdga.notification; -import pp.mdga.game.Color; - import java.util.UUID; -public class ThrowPieceNotification extends Notification{ - - private UUID pieceId; +/** + * Notification that is sent when a piece is thrown. + */ +public class ThrowPieceNotification extends Notification { + /** + * The id of the piece that was thrown. + */ + private final UUID pieceId; /** * This constructor is used to create a new ThrowPieceNotification @@ -15,6 +18,11 @@ public ThrowPieceNotification(UUID pieceId) { this.pieceId = pieceId; } + /** + * Get the id of the piece that was thrown. + * + * @return The id of the piece that was thrown. + */ public UUID getPieceId() { return pieceId; } diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/TskSelectNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/TskSelectNotification.java index bf339e0c..cebe8b58 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/TskSelectNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/TskSelectNotification.java @@ -5,16 +5,27 @@ /** * Class TskSelectNotification */ -public class TskSelectNotification extends Notification{ - +public class TskSelectNotification extends Notification { + /** + * The color of the player that is in the game. + */ private final Color color; + + /** + * The name of the player that is in the game. + */ private final String name; + + /** + * Indicates if the select notification affects the own user. + */ private final boolean isSelf; /** * Constructor. + * * @param color the color of the player that is in the game. - * @param name the name of the player that is in the game. + * @param name the name of the player that is in the game. */ public TskSelectNotification(Color color, String name, boolean isSelf) { this.color = color; @@ -24,6 +35,7 @@ public TskSelectNotification(Color color, String name, boolean isSelf) { /** * Get the color of the player that is in the game. + * * @return the color of the player that is in the game. */ public Color getColor() { @@ -32,6 +44,7 @@ public Color getColor() { /** * Get the name of the player that is in the game. + * * @return the name of the player that is in the game. */ public String getName() { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/TskUnselectNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/TskUnselectNotification.java index 4a036d46..923eb7b1 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/TskUnselectNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/TskUnselectNotification.java @@ -2,20 +2,27 @@ import pp.mdga.game.Color; -public class TskUnselectNotification extends Notification{ - - private Color color; +/** + * Notification for unselecting a player + */ +public class TskUnselectNotification extends Notification { + /** + * The color of the player + */ + private final Color color; /** * Constructor - * @param color + * + * @param color the color of the player */ - public TskUnselectNotification(Color color){ + public TskUnselectNotification(Color color) { this.color = color; } /** * Get the color + * * @return color */ public Color getColor() { diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/notification/WaitMoveNotification.java b/Projekte/mdga/model/src/main/java/pp/mdga/notification/WaitMoveNotification.java index bb2e9e8a..9ebc9380 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/notification/WaitMoveNotification.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/notification/WaitMoveNotification.java @@ -5,12 +5,15 @@ /** * Notification to inform the player that he has to wait for the other player to move. */ -public class WaitMoveNotification extends Notification{ - - private UUID pieceId; +public class WaitMoveNotification extends Notification { + /** + * The id of the piece that has to move. + */ + private final UUID pieceId; /** * Constructor. + * * @param pieceId the id of the piece that has to move. */ public WaitMoveNotification(UUID pieceId) { @@ -19,6 +22,7 @@ public WaitMoveNotification(UUID pieceId) { /** * Get the id of the piece that has to move. + * * @return the id of the piece that has to move. */ public UUID getPieceId() {