Updated 'Player' class.
Updated the 'Player' class by replacing all 'BonusCard' with 'PowerCard' in it.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
import pp.mdga.Resources;
|
||||
import pp.mdga.game.card.PowerCard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -23,7 +24,7 @@ public class Player {
|
||||
/**
|
||||
* The hand cards of the player.
|
||||
*/
|
||||
private ArrayList<BonusCard> handCards = new ArrayList<>();
|
||||
private ArrayList<PowerCard> handCards = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* The color of the player.
|
||||
@@ -93,7 +94,7 @@ public void initialize() {
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
public void removeHandCard(BonusCard card) {
|
||||
public void removeHandCard(PowerCard 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() {
|
||||
return handCards;
|
||||
public ArrayList<PowerCard> getHandCards() {
|
||||
return this.handCards;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user