Add: Added Javadoc For "toString" Method And "icon" Field In Building11.java.

This commit is contained in:
GabrieleRadice
2026-04-30 18:55:03 +02:00
parent b3ece597e1
commit 6141395ba3
@@ -7,6 +7,9 @@ import it.polimi.ingsw.gc14.Model.Player;
public class Building11 extends BuildingCard {
/**
* The icon attribute indicates the character type involved in the building effect.
*/
private CharacterType icon ;
/**
@@ -68,6 +71,17 @@ public class Building11 extends BuildingCard {
player.addPrestige(player.getNType(getIcon()) * this.getPrestigeMul());
}
/**
* Prints a string representation of this {@code Building1}. This specific variation is used in the {@code Game}'s
* toString to print a more detailed version.
* <p>includes:
* <li>{@link #icon Icon}
* <li>{@link #PrestigeMul Prestige Multiplier}
* </p>
* @return {@code String} - a string representation of this {@code Building1}.
* @see it.polimi.ingsw.gc14.Model.Game Game
* @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board
*/
@Override
public String toString() {
return super.toString() + " Icon: " + this.icon.toString().charAt(0) + " MP: " + this.PrestigeMul;