Updated 'PossibleCardMessage' class.

Updated the 'PossibleCardMessage' class by replacing all 'BonusCard' with 'PowerCard' in it.
This commit is contained in:
Daniel Grigencha
2024-12-06 00:19:11 +01:00
parent f7f246daaa
commit 50f9c0ef0c

View File

@@ -1,7 +1,7 @@
package pp.mdga.message.server; package pp.mdga.message.server;
import com.jme3.network.serializing.Serializable; import com.jme3.network.serializing.Serializable;
import pp.mdga.game.BonusCard; import pp.mdga.game.card.PowerCard;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -14,7 +14,7 @@ public class PossibleCardMessage extends ServerMessage {
/** /**
* The list of possible cards. * The list of possible cards.
*/ */
private final List<BonusCard> possibleCards; private final List<PowerCard> possibleCards;
/** /**
* Constructor for a PossibleCard instance. * Constructor for a PossibleCard instance.
@@ -25,21 +25,21 @@ public PossibleCardMessage() {
} }
/** /**
* Add a possible card to the list of possible cards * Constructor.
* *
* @param card the possible card to add * @param possibleCards as the list of possible power cards as a List of PowerCard objects.
*/ */
public void addPossibleCard(BonusCard card) { public PossibleCardMessage(List<PowerCard> possibleCards) {
this.possibleCards.add(card); this.possibleCards = possibleCards;
} }
/** /**
* Getter for the list of possible cards * This method will be used to return possibleCards attribute of PossibleCardMessage class.
* *
* @return the list of possible cards * @return possibleCards as a List of PowerCard objects.
*/ */
public List<BonusCard> getPossibleCards() { public List<PowerCard> getPossibleCards() {
return possibleCards; return this.possibleCards;
} }
/** /**