From 3a32a7ebf7de5ff8e63ff5735a4aacb23c33447b Mon Sep 17 00:00:00 2001 From: Daniel Grigencha Date: Fri, 6 Dec 2024 00:11:50 +0100 Subject: [PATCH] Updated 'Player' class. Updated the 'Player' class by replacing all 'BonusCard' with 'PowerCard' in it. --- .../model/src/main/java/pp/mdga/game/Player.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/game/Player.java b/Projekte/mdga/model/src/main/java/pp/mdga/game/Player.java index 1ca33b4d..987648ce 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/game/Player.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/game/Player.java @@ -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 handCards = new ArrayList<>(); + private ArrayList 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 getHandCards() { - return handCards; + public ArrayList getHandCards() { + return this.handCards; } /**