Files
Gruppe-01-fin/Projekte/mdga/model/src/main/java/pp.mdga/notification/RollDiceNotification.java
Hanno Fleischer 44b623f9fd added all Notifications for the model view communication
added all required notifications with their content and getter methods.
2024-11-16 18:58:33 +01:00

50 lines
1.1 KiB
Java

package pp.mdga.notification;
import pp.mdga.game.Color;
/**
* Notification that a die has been rolled.
*/
public class RollDiceNotification extends Notification{
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;
}
}