Add: JavaDoc for Building13

This commit is contained in:
MatteoPellegrino05
2026-04-12 18:42:05 +02:00
parent 690cc9af50
commit c6b96cf4eb
@@ -5,15 +5,36 @@ import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
import it.polimi.ingsw.gc14.Model.Player; import it.polimi.ingsw.gc14.Model.Player;
public class Building13 extends BuildingCard{ public class Building13 extends BuildingCard{
/**
* Creates a Building13 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 Building13(int era, int price,int prestigeValue) { public Building13(int era, int price,int prestigeValue) {
super(era,price,prestigeValue); super(era,price,prestigeValue);
effectType= EffectType.FINAL; effectType= EffectType.FINAL;
effectId=13; effectId=13;
} }
/**
* Creates and returns a copy of this Building13 card.
*
* @return a clone of this Building13 card
*/
@Override @Override
public BuildingCard clone() { public BuildingCard clone() {
return new Building13(getEra(),getPrice(),getPrestigeValue()); return new Building13(getEra(),getPrice(),getPrestigeValue());
} }
/**
* Applies the effect of this building card to the specified player.
*
* @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))