added all Notifications for the model view communication
added all required notifications with their content and getter methods.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user