added a method in 'Player' to return the first 'PowerCard' of a specific Type
This commit is contained in:
@@ -137,6 +137,21 @@ public boolean isFinished() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a
|
||||
*
|
||||
* @param bonusCard
|
||||
* @return
|
||||
*/
|
||||
public PowerCard getPowerCardByType(BonusCard bonusCard) {
|
||||
for (PowerCard card : this.handCards) {
|
||||
if(card.getCard().equals(bonusCard)) {
|
||||
return card;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the give name of the Player
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user