Module polimi.ingsw.am21.codex
Class GoldCardFrontSide
java.lang.Object
polimi.ingsw.am21.codex.model.Cards.Playable.PlayableSide
polimi.ingsw.am21.codex.model.Cards.Playable.PlayableFrontSide
polimi.ingsw.am21.codex.model.Cards.Playable.ResourceCardFrontSide
polimi.ingsw.am21.codex.model.Cards.Playable.GoldCardFrontSide
- All Implemented Interfaces:
CliCard
-
Constructor Summary
ConstructorsConstructorDescriptionGoldCardFrontSide
(int points, List<ResourceType> placementCondition, PointConditionType pointCondition, ObjectType pointConditionObject) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncardToAscii
(HashMap<Integer, String> cardStringMap) Converts the card to an ASCII representationGenerates a function that should be called to get the points that should be attributed to a player when they place a card on this side.Generates a function that should be called to get whether a side is placeable or not given a certain PlayerBoard.Methods inherited from class polimi.ingsw.am21.codex.model.Cards.Playable.PlayableSide
getCorners, setCorner
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface polimi.ingsw.am21.codex.view.TUI.utils.CliCard
cardToAscii
-
Constructor Details
-
GoldCardFrontSide
public GoldCardFrontSide(int points, List<ResourceType> placementCondition, PointConditionType pointCondition, ObjectType pointConditionObject) Constructor- Parameters:
points
- The points the card should attribute to the player (if conditions are met)placementCondition
- The resources required to place the cardpointCondition
- The type of condition required for the card to attribute points to the player (use null otherwise)pointConditionObject
- The object to count when the point condition is of type 'OBJECT' (use null otherwise)
-
-
Method Details
-
getEvaluator
Description copied from class:PlayableSide
Generates a function that should be called to get the points that should be attributed to a player when they place a card on this side. The returned function requires a PlayerBoard an Integer representing the number of corners the card is covering.- Overrides:
getEvaluator
in classResourceCardFrontSide
-
getPlaceabilityChecker
Description copied from class:PlayableSide
Generates a function that should be called to get whether a side is placeable or not given a certain PlayerBoard.- Overrides:
getPlaceabilityChecker
in classPlayableSide
-
cardToAscii
Description copied from interface:CliCard
Converts the card to an ASCII representation- Specified by:
cardToAscii
in interfaceCliCard
- Overrides:
cardToAscii
in classResourceCardFrontSide
- Parameters:
cardStringMap
- Maps the position of the item to the corresponding string to render inside the card- Returns:
- The rendered ASCII string
-
cardToString
- Specified by:
cardToString
in interfaceCliCard
- Overrides:
cardToString
in classResourceCardFrontSide
-