merge the new developmentbranch into the test branch #39

Closed
j23f0712 wants to merge 431 commits from development2 into dev/test
261 changed files with 13945 additions and 2637 deletions
Showing only changes of commit de592cfa48 - Show all commits

View File

@@ -3,8 +3,14 @@
import pp.mdga.client.gamestate.*;
import pp.mdga.game.BonusCard;
import pp.mdga.game.Piece;
import pp.mdga.game.card.HiddenCard;
import pp.mdga.game.card.ShieldCard;
import pp.mdga.game.card.SwapCard;
import pp.mdga.game.card.TurboCard;
import pp.mdga.message.client.LeaveGameMessage;
import pp.mdga.message.server.*;
import pp.mdga.notification.AcquireCardNotification;
import pp.mdga.notification.DrawCardNotification;
import pp.mdga.notification.InterruptNotification;
import pp.mdga.notification.StartDialogNotification;
@@ -288,7 +294,13 @@ public void received(ChoosePieceStateMessage msg){
@Override
public void received(DrawCardMessage msg){
state.received(msg);
switch (msg.getCard()) {
case HiddenCard hiddenCard -> logic.addNotification(new DrawCardNotification(logic.getGame().getActiveColor(), BonusCard.HIDDEN));
case TurboCard turboCard -> logic.addNotification(new AcquireCardNotification(BonusCard.TURBO));
case ShieldCard shieldCard -> logic.addNotification(new AcquireCardNotification(BonusCard.SHIELD));
case SwapCard swapCard -> logic.addNotification(new AcquireCardNotification(BonusCard.SWAP));
case null, default -> throw new RuntimeException();
}
}
/**

View File

@@ -151,13 +151,6 @@ public void received(ChoosePieceStateMessage msg){
@Override
public void received(DrawCardMessage msg){
switch (msg.getCard()) {
case HiddenCard hiddenCard -> logic.addNotification(new DrawCardNotification(logic.getGame().getActiveColor(), BonusCard.HIDDEN));
case TurboCard turboCard -> logic.addNotification(new AcquireCardNotification(BonusCard.TURBO));
case ShieldCard shieldCard -> logic.addNotification(new AcquireCardNotification(BonusCard.SHIELD));
case SwapCard swapCard -> logic.addNotification(new AcquireCardNotification(BonusCard.SWAP));
case null, default -> throw new RuntimeException();
}
}
public ChoosePieceState getChoosePiece() {