|
|
|
|
@@ -20,12 +20,15 @@ public class RequestPlayCardMessage extends ClientMessage {
|
|
|
|
|
*/
|
|
|
|
|
private final UUID ownPieceIdentifier;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The identifier of the enemy piece.
|
|
|
|
|
*/
|
|
|
|
|
private final UUID enemyPieceIdentifier;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructs a new RequestPlayCard instance.
|
|
|
|
|
*
|
|
|
|
|
* @param card the bonus card to be played
|
|
|
|
|
* @param card the bonus card to be played
|
|
|
|
|
* @param ownPieceIdentifier the identifier of the piece
|
|
|
|
|
*/
|
|
|
|
|
public RequestPlayCardMessage(BonusCard card, UUID ownPieceIdentifier, UUID enemyPieceIdentifier) {
|
|
|
|
|
@@ -46,11 +49,11 @@ private RequestPlayCardMessage() {
|
|
|
|
|
/**
|
|
|
|
|
* Creates a new RequestPlayCard instance for a given bonus card.
|
|
|
|
|
*
|
|
|
|
|
* @param ownPieceIdentifier the identifier of the piece
|
|
|
|
|
* @param ownPieceIdentifier the identifier of the piece
|
|
|
|
|
* @param enemyPieceIdentifier the identifier of the enemy piece
|
|
|
|
|
* @return a new RequestPlayCard instance
|
|
|
|
|
*/
|
|
|
|
|
public static RequestPlayCardMessage requestPlaySwap(UUID ownPieceIdentifier, UUID enemyPieceIdentifier){
|
|
|
|
|
public static RequestPlayCardMessage requestPlaySwap(UUID ownPieceIdentifier, UUID enemyPieceIdentifier) {
|
|
|
|
|
return new RequestPlayCardMessage(BonusCard.SWAP, ownPieceIdentifier, enemyPieceIdentifier);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -60,7 +63,7 @@ public static RequestPlayCardMessage requestPlaySwap(UUID ownPieceIdentifier, UU
|
|
|
|
|
* @param ownPieceIdentifier the identifier of the piece
|
|
|
|
|
* @return a new RequestPlayCard instance
|
|
|
|
|
*/
|
|
|
|
|
public static RequestPlayCardMessage requestPlayShield(UUID ownPieceIdentifier){
|
|
|
|
|
public static RequestPlayCardMessage requestPlayShield(UUID ownPieceIdentifier) {
|
|
|
|
|
return new RequestPlayCardMessage(BonusCard.SHIELD, ownPieceIdentifier, null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|