Class Jester
java.lang.Object
it.polimi.ingsw.eriantys.model.StudentContainer
it.polimi.ingsw.eriantys.model.characters.ContainerCharacterCard
it.polimi.ingsw.eriantys.model.characters.Jester
- All Implemented Interfaces:
CharacterCard
Represents the "jester" character card and the corresponding effect.
- See Also:
-
Field Summary
Fields inherited from class it.polimi.ingsw.eriantys.model.characters.ContainerCharacterCard
bag
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyEffect
(List<Color> sourceColors, List<Color> destinationColors, Color targetColor, IslandGroup targetIsland) Activates this card and applies the effect.Methods inherited from class it.polimi.ingsw.eriantys.model.characters.ContainerCharacterCard
cancelEffect, getCost, increaseCost, setupEffect
Methods inherited from class it.polimi.ingsw.eriantys.model.StudentContainer
empty, fill, getQuantity, getRepresentation, moveAllTo, moveTo, moveTo, refillFrom, remainingCapacity, swap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface it.polimi.ingsw.eriantys.model.characters.CharacterCard
getName
-
Constructor Details
-
Jester
Constructs a newJester
character card.- Parameters:
bag
- Reference to the bag object for the current game.currentPlayerSupplier
- Supplier to get the current player.
-
-
Method Details
-
applyEffect
public void applyEffect(List<Color> sourceColors, List<Color> destinationColors, Color targetColor, IslandGroup targetIsland) throws InvalidArgumentException, NoMovementException Description copied from interface:CharacterCard
Activates this card and applies the effect. If it is the first time also increases the cost for next activations. Only some arguments might be used for a specific character card effect.- Parameters:
sourceColors
- a list of student colors selected from the sourcedestinationColors
- a list of student colors selected from the destinationtargetColor
- the color selected for the effecttargetIsland
- the island selected for the effect- Throws:
InvalidArgumentException
- if one or more parameters are illegalNoMovementException
- if an error occurs while wielding student related movements and swaps
-