merge the new developmentbranch into the test branch #39

Closed
j23f0712 wants to merge 431 commits from development2 into dev/test
264 changed files with 14000 additions and 2670 deletions
Showing only changes of commit 5bccee96a2 - Show all commits

View File

@@ -42,7 +42,16 @@ 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()));
if(logic.getGame()){
logic.addNotification(new RollDiceNotification(logic.getGame().getPlayerById(logic.getOwnPlayerId()).getColor(), msg.getDiceEye()));
}
else {
logic.addNotification(new RollDiceNotification(logic.getGame().getPlayerById(logic.getOwnPlayerId()).getColor(), msg.getDiceEye(), logic.getGame().getDiceModifier()));
}
// logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes()));
//stats
if (msg.getDiceEye() == 6) {
logic.getGame().getPlayerByColor(logic.getGame().getActiveColor()).getPlayerStatistic().increaseDiced6();
logic.getGame().getGameStatistics().increaseDiced6();

View File

@@ -43,7 +43,13 @@ public void selectDice(){
@Override
public void received(DieMessage msg){
logic.getGame().setDiceEyes(msg.getDiceEye());
logic.addNotification(new RollDiceNotification(logic.getGame().getPlayerById(logic.getOwnPlayerId()).getColor(), msg.getDiceEye(),false));
if(logic.getGame()){
logic.addNotification(new RollDiceNotification(logic.getGame().getPlayerById(logic.getOwnPlayerId()).getColor(), msg.getDiceEye()));
}
else {
logic.addNotification(new RollDiceNotification(logic.getGame().getPlayerById(logic.getOwnPlayerId()).getColor(), msg.getDiceEye(), logic.getGame().getDiceModifier()));
}
}
@Override

View File

@@ -13,6 +13,7 @@ public class RollDiceNotification extends Notification{
private int multiplier;
private boolean isRanking;
//normal
/**
* Constructor.
* @param color the color of the player that rolled the die.
@@ -26,6 +27,7 @@ public RollDiceNotification(Color color, int eyes) {
this.isRanking = false;
}
//ranking
public RollDiceNotification(Color color, int eyes, boolean isRanking) {
this.color = color;
this.eyes = eyes;
@@ -34,10 +36,11 @@ public RollDiceNotification(Color color, int eyes, boolean isRanking) {
this.isRanking = isRanking;
}
public RollDiceNotification(Color color, int eyes, boolean turbo, int multiplier) {
//turbo
public RollDiceNotification(Color color, int eyes, int multiplier) {
this.color = color;
this.eyes = eyes;
this.turbo = turbo;
this.turbo = true;
this.multiplier = multiplier;
this.isRanking = false;
}