Class Builder
java.lang.Object
it.polimi.ingsw.gc14.Model.PlayableCard
it.polimi.ingsw.gc14.Model.Cards.TribeCard
it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character
it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Builder
- All Implemented Interfaces:
Serializable, Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe prestige value provided by this Builder card.private final intThe reduction value provided by this Builder card. -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(int Era, int reductionValue, int prestigeValue) Creates a Builder character card with the specified era, reduction value, and prestige value.Builder(int Era, int reductionValue, int prestigeValue, int nMin) Creates a Builder character card with the specified era, reduction value, prestige value, and minimum number of players.Creates a Builder character card with the specified era, reduction value, and prestige value.Creates a Builder character card with the specified era, reduction value, prestige value, and minimum number of players. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of this Builder card.intReturns the prestige value of this Builder card.intReturns the reduction value of this Builder card.voidInserts this Builder card into the specified player's Builder collection and applies any building effects triggered by character set completion.Returns the representation shown on the board (offer track cards).Returns the compact representation shown in the player hand panel.Methods inherited from class TribeCard
getNMin, isEventCardMethods inherited from class PlayableCard
getEra, getIdIMG
-
Field Details
-
reductionValue
private final int reductionValueThe reduction value provided by this Builder card. -
prestigeValue
private final int prestigeValueThe prestige value provided by this Builder card.
-
-
Constructor Details
-
Builder
Creates a Builder character card with the specified era, reduction value, and prestige value.- Parameters:
Era- the era of the Builder card.reductionValue- the reduction value of the Builder card.prestigeValue- the prestige value of the Builder card.- Throws:
IllegalArgumentException- ifreductionValue < 0orprestigeValue < 0.
-
Builder
public Builder(int Era, int reductionValue, int prestigeValue, int nMin) throws IllegalArgumentException Creates a Builder character card with the specified era, reduction value, prestige value, and minimum number of players.- Parameters:
Era- the era of the Builder card.reductionValue- the reduction value of the Builder card.prestigeValue- the prestige value of the Builder card.nMin- the minimum number of players required for the card.- Throws:
IllegalArgumentException- ifreductionValue < 0orprestigeValue < 0.
-
Builder
public Builder(String idIMG, int Era, int reductionValue, int prestigeValue) throws IllegalArgumentException Creates a Builder character card with the specified era, reduction value, and prestige value.- Parameters:
idIMG- the image identifier of the Builder card.Era- the era of the Builder card.reductionValue- the reduction value of the Builder card.prestigeValue- the prestige value of the Builder card.- Throws:
IllegalArgumentException- ifreductionValue < 0orprestigeValue < 0.
-
Builder
public Builder(String idIMG, int Era, int reductionValue, int prestigeValue, int nMin) throws IllegalArgumentException Creates a Builder character card with the specified era, reduction value, prestige value, and minimum number of players.- Parameters:
idIMG- the image identifier of the Builder card.Era- the era of the Builder card.reductionValue- the reduction value of the Builder card.prestigeValue- the prestige value of the Builder card.nMin- the minimum number of players required for the card.- Throws:
IllegalArgumentException- ifreductionValue < 0orprestigeValue < 0.
-
-
Method Details
-
getReductionValue
public int getReductionValue()Returns the reduction value of this Builder card.- Returns:
- the reduction value of this Builder card.
-
getPrestigeValue
public int getPrestigeValue()Returns the prestige value of this Builder card.- Returns:
- the prestige value of this Builder card.
-
toStringPlayer
Description copied from class:PlayableCardReturns the compact representation shown in the player hand panel.- Specified by:
toStringPlayerin classPlayableCard- Returns:
- the player-hand string representation of this card.
-
toStringBoard
Description copied from class:PlayableCardReturns the representation shown on the board (offer track cards).- Specified by:
toStringBoardin classPlayableCard- Returns:
- the board string representation of this card.
-
clone
-
insert
-