added all Notifications for the model view communication

added all required notifications with their content and getter methods.
This commit is contained in:
Hanno Fleischer
2024-11-16 18:58:33 +01:00
parent 6b2d775534
commit 44b623f9fd
23 changed files with 556 additions and 13 deletions

View File

@@ -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;
}
}