Module polimi.ingsw.am21.codex
Class ResourceCardFrontSide
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
- All Implemented Interfaces:
CliCard
- Direct Known Subclasses:
GoldCardFrontSide
-
Constructor Summary
Constructors -
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.Methods inherited from class polimi.ingsw.am21.codex.model.Cards.Playable.PlayableSide
getCorners, getPlaceabilityChecker, setCornerMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface polimi.ingsw.am21.codex.view.TUI.utils.CliCard
cardToAscii
-
Constructor Details
-
ResourceCardFrontSide
public ResourceCardFrontSide(int points) Constructor- Parameters:
points- The points the card should attribute to the player
-
-
Method Details
-
getEvaluator
Description copied from class:PlayableSideGenerates 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.- Specified by:
getEvaluatorin classPlayableSide
-
cardToAscii
Description copied from interface:CliCardConverts the card to an ASCII representation- Specified by:
cardToAsciiin interfaceCliCard- Overrides:
cardToAsciiin classPlayableSide- 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:
cardToStringin interfaceCliCard
-