added further notification implemenation

This commit is contained in:
Cedric Beck
2024-11-30 00:33:10 +01:00
parent 13690cf73d
commit 07f0f55192
14 changed files with 164 additions and 60 deletions

View File

@@ -3,24 +3,32 @@
import pp.mdga.game.Color;
/**
* Notification that a die has been rolled.
* Notification that a dice has been rolled.
*/
public class RollDiceNotification extends Notification{
private Color color;
private int eyes;
private int moveNumber;
private boolean turbo;
private int multiplier;
/**
* 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) {
RollDiceNotification(Color color, int eyes) {
this.color = color;
this.eyes = eyes;
this.moveNumber = moveNumber;
this.multiplier = -1;
this.turbo = false;
}
RollDiceNotification(Color color, int eyes, boolean turbo, int multiplier) {
this.color = color;
this.eyes = eyes;
this.multiplier = multiplier;
this.turbo = turbo;
}
/**
@@ -39,11 +47,11 @@ 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;
public int getMultiplier() {
return multiplier;
}
public boolean isTurbo() {
return turbo;
}
}