fixed missing messages
This commit is contained in:
@@ -34,7 +34,7 @@ public void received(CeremonyMessage msg){
|
||||
@Override
|
||||
public void received(DieMessage msg){
|
||||
logic.getGame().setDiceEyes(msg.getDiceEye());
|
||||
logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes(), logic.getGame().getDiceEyes() * logic.getGame().getDiceModifier()));
|
||||
// logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes(), logic.getGame().getDiceEyes() * logic.getGame().getDiceModifier()));
|
||||
if(msg.getDiceEye() == 6){
|
||||
logic.getGame().getPlayerByColor(logic.getGame().getActiveColor()).getPlayerStatistic().increaseDiced6();
|
||||
logic.getGame().getGameStatistics().increaseDiced6();
|
||||
|
||||
@@ -40,7 +40,7 @@ public void received(DiceNowMessage msg){
|
||||
@Override
|
||||
public void received(DieMessage msg){
|
||||
logic.getGame().setDiceEyes(msg.getDiceEye());
|
||||
logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes(), logic.getGame().getDiceEyes() * logic.getGame().getDiceModifier()));
|
||||
// logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes(), logic.getGame().getDiceEyes() * logic.getGame().getDiceModifier()));
|
||||
if(msg.getDiceEye() == 6){
|
||||
logic.getGame().getPlayerByColor(logic.getGame().getActiveColor()).getPlayerStatistic().increaseDiced6();
|
||||
logic.getGame().getGameStatistics().increaseDiced6();
|
||||
|
||||
@@ -9,18 +9,26 @@ 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.
|
||||
*/
|
||||
public RollDiceNotification(Color color, int eyes, int moveNumber) {
|
||||
public RollDiceNotification(Color color, int eyes) {
|
||||
this.color = color;
|
||||
this.eyes = eyes;
|
||||
this.moveNumber = moveNumber;
|
||||
this.turbo = false;
|
||||
this.multiplier = -1;
|
||||
}
|
||||
|
||||
public RollDiceNotification(Color color, int eyes, boolean turbo, int multiplier) {
|
||||
this.color = color;
|
||||
this.eyes = eyes;
|
||||
this.turbo = turbo;
|
||||
this.multiplier = multiplier;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class SelectableShieldNotification extends Notification{
|
||||
private List<UUID> pieces;
|
||||
|
||||
public SelectableShieldNotification(List<UUID> pieces){
|
||||
this.pieces = pieces;
|
||||
}
|
||||
|
||||
public List<UUID> getPieces() {
|
||||
return pieces;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
public class TurboActiveNotification extends Notification{
|
||||
}
|
||||
Reference in New Issue
Block a user