Add: JavaDoc for Building10
This commit is contained in:
@@ -9,15 +9,39 @@ import it.polimi.ingsw.gc14.Model.Player;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class Building10 extends BuildingCard {
|
public class Building10 extends BuildingCard {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Building10 card with the specified era, price, and prestige value.
|
||||||
|
*
|
||||||
|
* @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
|
||||||
|
*/
|
||||||
public Building10(int era, int price,int prestigeValue) {
|
public Building10(int era, int price,int prestigeValue) {
|
||||||
super(era,price,prestigeValue);
|
super(era,price,prestigeValue);
|
||||||
effectType= EffectType.FINAL;
|
effectType= EffectType.FINAL;
|
||||||
effectId=10;
|
effectId=10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and returns a copy of this Building10 card.
|
||||||
|
*
|
||||||
|
* @return a clone of this Building10 card
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BuildingCard clone() {
|
public BuildingCard clone() {
|
||||||
return new Building10(getEra(),getPrice(),getPrestigeValue());
|
return new Building10(getEra(),getPrice(),getPrestigeValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the effect of this building card to the specified player.
|
||||||
|
* The effect grants 6 prestige points for each complete set of character cards
|
||||||
|
* owned by the player, where a complete set contains one card of each
|
||||||
|
* {@link CharacterType}.
|
||||||
|
*
|
||||||
|
* @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