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 new file mode 100644 index 00000000..6a214f90 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/AcquireCardNotification.java @@ -0,0 +1,27 @@ +package pp.mdga.notification; + +import java.util.UUID; + +/** + * Notification that is sent when a card is acquired. + */ +public class AcquireCardNotification extends Notification{ + + private UUID cardId; + + /** + * Constructor. + * @param cardId The id of the card that was acquired. + */ + public AcquireCardNotification(UUID cardId) { + this.cardId = cardId; + } + + /** + * Get the id of the card that was acquired. + * @return The id of the card that was acquired. + */ + public UUID getCardId() { + return cardId; + } +} 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 8a2e0339..59ecfe47 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 @@ -2,8 +2,23 @@ import pp.mdga.game.Color; +/** + * Notification that the active player has changed + */ public class ActivePlayerNotification extends Notification { - ActivePlayerNotification(Color color) { + /** + * The color of the active player + */ + private Color color; + ActivePlayerNotification(Color color) { + this.color = color; + } + + /** + * @return the color of the active player + */ + public Color getColor() { + return 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 new file mode 100644 index 00000000..3f88eb8a --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/CeremonyNotification.java @@ -0,0 +1,12 @@ +package pp.mdga.notification; + +/** + * Class CeremonyNotification + */ +public class CeremonyNotification extends Notification{ + /** + * Constructor + */ + CeremonyNotification() { + } +} 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 new file mode 100644 index 00000000..fce8c9b1 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/DiceNowNotification.java @@ -0,0 +1,13 @@ +package pp.mdga.notification; + +/** + * Notification that the dice is now. + */ +public class DiceNowNotification extends Notification { + + /** + * Constructor. + */ + DiceNowNotification() { + } +} 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 new file mode 100644 index 00000000..5c1c7ecf --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/DicingNotification.java @@ -0,0 +1,27 @@ +package pp.mdga.notification; + +import pp.mdga.game.Color; + +/** + * Notification that is sent when a player has diced. + */ +public class DicingNotification extends Notification{ + + private Color color; + + /** + * Constructor. + * @param color The color of the player that diced. + */ + DicingNotification(Color color) { + this.color = color; + } + + /** + * Get the color of the player that diced. + * @return The color of the player that diced. + */ + public Color getColor() { + return color; + } +} 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 a8c73551..c43702df 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 @@ -2,9 +2,34 @@ import pp.mdga.game.BonusCard; import pp.mdga.game.Color; - +/** + * Notification that a card has been drawn + */ public class DrawCardNotification extends Notification { - DrawCardNotification(Color color, BonusCard card) { + private Color color; + private BonusCard card; + + /** + * @param color the color of the player who drew the card + * @param card the card that was drawn + */ + DrawCardNotification(Color color, BonusCard card) { + this.color = color; + this.card = card; + } + + /** + * @return the color of the player who drew the card + */ + public Color getColor() { + return color; + } + + /** + * @return the card that was drawn + */ + public BonusCard getCard() { + return card; } } 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 new file mode 100644 index 00000000..90c60694 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/GameNotification.java @@ -0,0 +1,12 @@ +package pp.mdga.notification; + +/** + * GameNotification class + */ +public class GameNotification extends Notification{ + /** + * Constructor + */ + GameNotification() { + } +} 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 new file mode 100644 index 00000000..48cecc52 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/HomeMoveNotification.java @@ -0,0 +1,41 @@ +package pp.mdga.notification; + +import java.util.UUID; + +/** + * Notification that a piece has moved to a home. + */ +public class HomeMoveNotification extends Notification { + + private UUID pieceId; + private int homeIndex; + + /** + * Constructor. + * + * @param pieceId the piece id + * @param homeIndex the home index + */ + HomeMoveNotification(UUID pieceId, int homeIndex) { + this.pieceId = pieceId; + this.homeIndex = homeIndex; + } + + /** + * Get the piece id. + * + * @return the piece id + */ + public UUID getPieceId() { + return pieceId; + } + + /** + * Get the home index. + * + * @return the home index + */ + public int getHomeIndex() { + return 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 f9459c55..acebe160 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 @@ -1,9 +1,23 @@ package pp.mdga.notification; import pp.mdga.game.Color; - +/** + * Notification that a card has been drawn + */ public class InterruptNotification extends Notification { - InterruptNotification(Color color) { + private Color color; + /** + * @param color the color of the player who drew the card + */ + InterruptNotification(Color color) { + this.color = color; + } + + /** + * @return the color of the player who drew the card + */ + public Color getColor() { + return color; } } 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 new file mode 100644 index 00000000..7c1a4adf --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/LobbyDialogNotification.java @@ -0,0 +1,12 @@ +package pp.mdga.notification; + +/** + * Notification that a dialog has been started + */ +public class LobbyDialogNotification extends Notification{ + /** + * Constructor + */ + LobbyDialogNotification() { + } +} 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 b35918cc..7a5ed1d1 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 @@ -2,8 +2,37 @@ import pp.mdga.game.Color; +/** + * Notification that a piece has been moved. + */ public class MovePieceNotification extends Notification { - MovePieceNotification(Color color, int nodeIndex) { + private Color color; + private int nodeIndex; + + /** + * Constructor. + * @param color the color of the piece that has been moved. + * @param nodeIndex the index of the node the piece has been moved to. + */ + MovePieceNotification(Color color, int nodeIndex) { + this.color = color; + this.nodeIndex = nodeIndex; + } + + /** + * Get the color of the piece that has been moved. + * @return the color of the piece that has been moved. + */ + public Color getColor() { + return color; + } + + /** + * Get the index of the node the piece has been moved to. + * @return the index of the node the piece has been moved to. + */ + public int getNodeIndex() { + return nodeIndex; } } diff --git a/Projekte/mdga/model/src/main/java/pp.mdga/notification/PieceInGameNotification.java b/Projekte/mdga/model/src/main/java/pp.mdga/notification/PieceInGameNotification.java index 5e0585fd..7afce473 100644 --- a/Projekte/mdga/model/src/main/java/pp.mdga/notification/PieceInGameNotification.java +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/PieceInGameNotification.java @@ -4,8 +4,34 @@ import java.util.UUID; +/** + * Notification that a piece is in the game + */ public class PieceInGameNotification extends Notification{ - PieceInGameNotification(Color color, UUID id) { + private Color color; + private UUID id; + /** + * Constructor + * @param color the color of the piece + * @param id the id of the piece + */ + PieceInGameNotification(Color color, UUID id) { + this.color = color; + this.id = id; + } + + /** + * @return the color of the piece + */ + public Color getColor() { + return null; + } + + /** + * @return the id of the piece + */ + public UUID getId() { + return null; } } 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 f2e73063..d554a0e6 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 @@ -3,8 +3,37 @@ import pp.mdga.game.BonusCard; import pp.mdga.game.Color; +/** + * Notification that a card has been played. + */ public class PlayCardNotification extends Notification { - PlayCardNotification(Color color, BonusCard card) { + private Color color; + private BonusCard card; + + /** + * Constructor. + * @param color the color of the player that played the card. + * @param card the card that was played. + */ + PlayCardNotification(Color color, BonusCard card) { + this.color = color; + this.card = card; + } + + /** + * Get the color of the player that played the card. + * @return the color of the player that played the card. + */ + public Color getColor() { + return color; + } + + /** + * Get the card that was played. + * @return the card that was played. + */ + public BonusCard getCard() { + return card; } } 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 c1c77cc9..1db710c9 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 @@ -2,8 +2,37 @@ import pp.mdga.game.Color; +/** + * Notification that a player is in the game. + */ public class PlayerInGameNotification extends Notification { - PlayerInGameNotification(Color color, String name) { + private Color color; + private String name; + + /** + * 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. + */ + PlayerInGameNotification(Color color, String name) { + this.color = color; + this.name = 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() { + return color; + } + + /** + * 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; } } 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 6a28137d..98533e06 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 @@ -2,8 +2,26 @@ import pp.mdga.game.Color; +/** + * Notification that a player is in the game. + */ public class ResumeNotification extends Notification { - ResumeNotification(Color color) { + private Color color; + + /** + * Constructor. + * @param color the color of the player that is in the game. + */ + ResumeNotification(Color color) { + this.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() { + return color; } } 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 48ca8192..b6bd27c3 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 @@ -2,8 +2,48 @@ import pp.mdga.game.Color; +/** + * Notification that a die has been rolled. + */ public class RollDiceNotification extends Notification{ - RollDiceNotification(Color color, int eyes, int moveNumber) { + private Color color; + private int eyes; + private int moveNumber; + + /** + * Constructor. + * @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. + */ + RollDiceNotification(Color color, int eyes, int moveNumber) { + this.color = color; + this.eyes = eyes; + this.moveNumber = moveNumber; + } + + /** + * Get the color of the player that rolled the die. + * @return the color of the player that rolled the die. + */ + public Color getColor() { + return color; + } + + /** + * Get the number of eyes that were rolled. + * @return the number of eyes that were rolled. + */ + public int getEyes() { + return eyes; + } + + /** + * Get the number of the move that was made. + * @return the number of the move that was made. + */ + public int getMoveNumber() { + return moveNumber; } } 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 new file mode 100644 index 00000000..925bde75 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/SelectableCardsNotification.java @@ -0,0 +1,28 @@ +package pp.mdga.notification; + +import pp.mdga.game.BonusCard; +import java.util.List; + +/** + * Notification that contains a list of cards that the player can choose from. + */ +public class SelectableCardsNotification extends Notification { + + private List cards; + + /** + * Constructor. + * @param cards The list of cards that the player can choose from. + */ + SelectableCardsNotification(List cards) { + this.cards = cards; + } + + /** + * Get the list of cards that the player can choose from. + * @return The list of cards that the player can choose from. + */ + public List getCards() { + return cards; + } +} diff --git a/Projekte/mdga/model/src/main/java/pp.mdga/notification/SelectablePiecesNotification.java b/Projekte/mdga/model/src/main/java/pp.mdga/notification/SelectablePiecesNotification.java new file mode 100644 index 00000000..7179a721 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/SelectablePiecesNotification.java @@ -0,0 +1,26 @@ +package pp.mdga.notification; + +import java.util.List; +import java.util.UUID; + +/** + * Notification to inform the client about the selectable pieces. + */ +public class SelectablePiecesNotification extends Notification{ + + private List selectablePieces; + + /** + * @param selectablePieces + */ + SelectablePiecesNotification(List selectablePieces){ + this.selectablePieces = selectablePieces; + } + + /** + * @return List + */ + public List getSelectablePieces(){ + return selectablePieces; + } +} 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 new file mode 100644 index 00000000..f2458c14 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/StartDialogNotification.java @@ -0,0 +1,12 @@ +package pp.mdga.notification; + +/** + * Notification that a dialog has been started + */ +public class StartDialogNotification extends Notification{ + /** + * Constructor + */ + StartDialogNotification() { + } +} 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 b287e403..2032f66a 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 @@ -2,8 +2,38 @@ import java.util.UUID; +/** + * Notification that two pieces have been swapped. + */ public class SwapPieceNotification extends Notification { - SwapPieceNotification(UUID a, UUID b) { - assert(!a.equals(b)); + + private UUID firstPiece; + private UUID secondPiece; + + /** + * Constructor. + * @param firstPiece the UUID of the first piece that has been swapped. + * @param secondPiece the UUID of the second piece that has been swapped. + */ + SwapPieceNotification(UUID firstPiece, UUID 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() { + return firstPiece; + } + + /** + * 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() { + return secondPiece; } } 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 new file mode 100644 index 00000000..11884267 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/TskSelectNotification.java @@ -0,0 +1,27 @@ +package pp.mdga.notification; + +import pp.mdga.game.Color; + +/** + * Class TskSelectNotification + */ +public class TskSelectNotification extends Notification{ + + private Color color; + + /** + * Constructor. + * @param color the color of the player that is in the game. + */ + TskSelectNotification(Color color) { + this.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() { + return color; + } +} 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 new file mode 100644 index 00000000..0f96beb1 --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/TskUnselectNotification.java @@ -0,0 +1,24 @@ +package pp.mdga.notification; + +import pp.mdga.game.Color; + +public class TskUnselectNotification extends Notification{ + + private Color color; + + /** + * Constructor + * @param color + */ + TskUnselectNotification(Color color){ + this.color = color; + } + + /** + * Get the color + * @return color + */ + public Color getColor() { + return color; + } +} 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 new file mode 100644 index 00000000..bb2e9e8a --- /dev/null +++ b/Projekte/mdga/model/src/main/java/pp.mdga/notification/WaitMoveNotification.java @@ -0,0 +1,27 @@ +package pp.mdga.notification; + +import java.util.UUID; + +/** + * Notification to inform the player that he has to wait for the other player to move. + */ +public class WaitMoveNotification extends Notification{ + + private UUID pieceId; + + /** + * Constructor. + * @param pieceId the id of the piece that has to move. + */ + public WaitMoveNotification(UUID pieceId) { + this.pieceId = pieceId; + } + + /** + * Get the id of the piece that has to move. + * @return the id of the piece that has to move. + */ + public UUID getPieceId() { + return pieceId; + } +}