Updated 'Player' class.

Updated the 'Player' class by replacing all 'BonusCard' with 'PowerCard' in it.
This commit is contained in:
Daniel Grigencha
2024-12-06 00:11:50 +01:00
parent 6894802c00
commit 3a32a7ebf7

View File

@@ -2,6 +2,7 @@
import com.jme3.network.serializing.Serializable; import com.jme3.network.serializing.Serializable;
import pp.mdga.Resources; import pp.mdga.Resources;
import pp.mdga.game.card.PowerCard;
import java.util.ArrayList; import java.util.ArrayList;
@@ -23,7 +24,7 @@ public class Player {
/** /**
* The hand cards of the player. * The hand cards of the player.
*/ */
private ArrayList<BonusCard> handCards = new ArrayList<>(); private ArrayList<PowerCard> handCards = new ArrayList<>();
/** /**
* The color of the player. * The color of the player.
@@ -93,7 +94,7 @@ public void initialize() {
* *
* @param card the card to be added to the players hand * @param card the card to be added to the players hand
*/ */
public void addHandCard(BonusCard card) { public void addHandCard(PowerCard card) {
this.handCards.add(card); this.handCards.add(card);
} }
@@ -102,7 +103,7 @@ public void addHandCard(BonusCard card) {
* *
* @param card as the card which should be removed from the handCards attribute as a PowerCard object. * @param card as the card which should be removed from the handCards attribute as a PowerCard object.
*/ */
public void removeHandCard(BonusCard card) { public void removeHandCard(PowerCard card) {
this.handCards.remove(card); this.handCards.remove(card);
} }
@@ -155,12 +156,12 @@ public Statistic getPlayerStatistic() {
} }
/** /**
* This method returns the current handCards of the player * This method will be used to return handCards attribute of Player class.
* *
* @return the handCards of the player * @return handCards as a List of PowerCard objects.
*/ */
public ArrayList<BonusCard> getHandCards() { public ArrayList<PowerCard> getHandCards() {
return handCards; return this.handCards;
} }
/** /**