merge the new developmentbranch into the test branch #39
@@ -169,8 +169,8 @@ private void handleGame(Notification notification) {
|
||||
} else if (notification instanceof ThrowPieceNotification n) {
|
||||
boardHandler.throwPiece(n.getPieceId(), n.getThrowColor());
|
||||
waitForAnimation = true;
|
||||
} else if (notification instanceof NoShieldNotification n) {
|
||||
boardHandler.unshieldPiece(n.getPieceId());
|
||||
} else if (notification instanceof RemoveShieldNotification n) {
|
||||
boardHandler.unshieldPiece(n.getPieceUuid());
|
||||
} else if (notification instanceof PlayCardNotification n) {
|
||||
if(n.getCard() == BonusCard.TURBO) {
|
||||
guiHandler.turbo();
|
||||
|
||||
@@ -92,9 +92,9 @@ public Game() {
|
||||
* This method initializes the draw pile with the predefined number of bonus cards.
|
||||
*/
|
||||
private void initializeDrawPile() {
|
||||
// this.addBonusCards(new TurboCard(), AMOUNT_OF_TURBO_CARDS);
|
||||
this.addBonusCards(new TurboCard(), AMOUNT_OF_TURBO_CARDS);
|
||||
// this.addBonusCards(new SwapCard(), AMOUNT_OF_SWAP_CARDS);
|
||||
this.addBonusCards(new ShieldCard(), AMOUNT_OF_SHIELD_CARDS);
|
||||
// this.addBonusCards(new ShieldCard(), AMOUNT_OF_SHIELD_CARDS);
|
||||
Collections.shuffle(this.drawPile);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Notification that a piece has no shield.
|
||||
*/
|
||||
public class NoShieldNotification extends Notification{
|
||||
/**
|
||||
* The id of the piece that has no shield.
|
||||
*/
|
||||
private final UUID pieceId;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param pieceId the id of the piece that has no shield.
|
||||
*/
|
||||
public NoShieldNotification(UUID pieceId) {
|
||||
this.pieceId = pieceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the id of the piece that has no shield.
|
||||
* @return the id of the piece that has no shield.
|
||||
*/
|
||||
public UUID getPieceId() {
|
||||
return pieceId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user