java.lang.Object
polimi.ingsw.am21.codex.model.Cards.Card
- All Implemented Interfaces:
GuiElement,CliCard
- Direct Known Subclasses:
ObjectiveCard,PlayableCard
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Function<PlayerBoard, Integer> Generates a function that, when called by passing the player board, returns the points of the card.intgetId()Gets the path of the image representing the element, relative to the base path.getImagePath(CardSideType sideType) Returns the path of the image of the card, given the side typeMethods 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, cardToAscii, cardToString
-
Constructor Details
-
Card
public Card(int id) - Parameters:
id- A unique identifier for the card
-
-
Method Details
-
getId
public int getId()- Returns:
- The unique identifier of the card
-
getEvaluator
Generates a function that, when called by passing the player board, returns the points of the card. -
getImagePath
Description copied from interface:GuiElementGets the path of the image representing the element, relative to the base path. Does not need a leading slash.- Specified by:
getImagePathin interfaceGuiElement
-
getImagePath
Returns the path of the image of the card, given the side type- Parameters:
sideType- The visible side of the card
-