Add: JavaDoc for Building11
This commit is contained in:
@@ -9,11 +9,32 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
public class Building11 extends BuildingCard {
|
public class Building11 extends BuildingCard {
|
||||||
private CharacterType icon ;
|
private CharacterType icon ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the CharacterType associated with this building card effect.
|
||||||
|
*
|
||||||
|
* @return the CharacterType associated with this building card effect
|
||||||
|
*/
|
||||||
public CharacterType getIcon() {return icon;}
|
public CharacterType getIcon() {return icon;}
|
||||||
private int PrestigeMul;
|
private int PrestigeMul;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the prestige multiplier associated with this building card effect.
|
||||||
|
*
|
||||||
|
* @return the prestige multiplier associated with this building card effect
|
||||||
|
*/
|
||||||
public int getPrestigeMul() {return PrestigeMul;}
|
public int getPrestigeMul() {return PrestigeMul;}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Building11 card with the specified era, price, prestige value,
|
||||||
|
* character type icon, and prestige multiplier.
|
||||||
|
*
|
||||||
|
* @param era the era of the building card
|
||||||
|
* @param price the price of the building card
|
||||||
|
* @param prestigeValue the prestige value of the building card
|
||||||
|
* @param icon the CharacterType associated with the building card effect
|
||||||
|
* @param prestigeMul the prestige multiplier of the building card effect
|
||||||
|
*/
|
||||||
public Building11(int era, int price,int prestigeValue, CharacterType icon, int prestigeMul) {
|
public Building11(int era, int price,int prestigeValue, CharacterType icon, int prestigeMul) {
|
||||||
super(era,price,prestigeValue);
|
super(era,price,prestigeValue);
|
||||||
effectType = EffectType.FINAL;
|
effectType = EffectType.FINAL;
|
||||||
@@ -21,10 +42,25 @@ public class Building11 extends BuildingCard {
|
|||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
this.PrestigeMul = prestigeMul;
|
this.PrestigeMul = prestigeMul;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and returns a copy of this Building11 card.
|
||||||
|
*
|
||||||
|
* @return a clone of this Building11 card
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BuildingCard clone() {
|
public BuildingCard clone() {
|
||||||
return new Building11(getEra(),getPrice(),getPrestigeValue(), getIcon(), getPrestigeMul());
|
return new Building11(getEra(),getPrice(),getPrestigeValue(), getIcon(), getPrestigeMul());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the effect of this building card to the specified player.
|
||||||
|
* The effect grants prestige points equal to the number of cards of the
|
||||||
|
* associated CharacterType owned by the player, multiplied by the prestige multiplier.
|
||||||
|
*
|
||||||
|
* @param player the player to whom the effect is applied
|
||||||
|
* @throws IllegalArgumentException if the player does not own this building card
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||||
if(!player.buildingCards.contains(this))
|
if(!player.buildingCards.contains(this))
|
||||||
|
|||||||
Reference in New Issue
Block a user