working on matrix-animation
This commit is contained in:
@@ -42,7 +42,7 @@ protected void handlePowerCard(PlayCardMessage msg){
|
||||
protected void throwPiece(Piece piece){
|
||||
logic.getGame().getBoard().getInfield()[logic.getGame().getBoard().getInfieldIndexOfPiece(piece)].clearOccupant();
|
||||
logic.getGame().getBoard().getPlayerData().get(piece.getColor()).addWaitingPiece(piece);
|
||||
logic.addNotification(new ThrowPieceNotification(piece.getUuid()));
|
||||
// logic.addNotification(new ThrowPieceNotification(piece.getUuid()));
|
||||
logic.getGame().getPlayerByColor(piece.getColor()).getPlayerStatistic().increasePiecesBeingThrown();
|
||||
logic.getGame().getGameStatistics().increasePiecesBeingThrown();
|
||||
piece.setState(PieceState.WAITING);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import pp.mdga.game.Color;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@@ -10,12 +12,14 @@ public class ThrowPieceNotification extends Notification {
|
||||
* The id of the piece that was thrown.
|
||||
*/
|
||||
private final UUID pieceId;
|
||||
private final Color throwColor;
|
||||
|
||||
/**
|
||||
* This constructor is used to create a new ThrowPieceNotification
|
||||
*/
|
||||
public ThrowPieceNotification(UUID pieceId) {
|
||||
public ThrowPieceNotification(UUID pieceId, Color throwColor) {
|
||||
this.pieceId = pieceId;
|
||||
this.throwColor = throwColor;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -26,4 +30,8 @@ public ThrowPieceNotification(UUID pieceId) {
|
||||
public UUID getPieceId() {
|
||||
return pieceId;
|
||||
}
|
||||
|
||||
public Color getThrowColor() {
|
||||
return throwColor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user