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 13940 additions and 2637 deletions
Showing only changes of commit 1c87b566e9 - Show all commits

View File

@@ -11,7 +11,13 @@
import pp.mdga.client.gamestate.turnstate.TurnStates;
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.server.*;
import pp.mdga.notification.AcquireCardNotification;
import pp.mdga.notification.DrawCardNotification;
public class TurnState extends GameStates {
@@ -145,7 +151,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();
}
}
public ChoosePieceState getChoosePiece() {