- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PointsCorner
,PointsInstant
,PointsResource
Representation of the points of a playable card.
It contains information about how to calculate the points, and allows to actually calculate them given a field and a card side playable.
Following the game rules, it should be used to calculate points when a player plays a card side.
-
Method Summary
Modifier and TypeMethodDescriptionint
calcPoints
(CardSidePlayableIF cardSidePlayable, FieldIF field) Calculate points of the card, according to information present in class that implements this interface.int
Return the points multiplier.Return the required resource to get points by playing the card.boolean
Returns true if the number of points is conditioned to the number of angles the card covers.
-
Method Details
-
calcPoints
Calculate points of the card, according to information present in class that implements this interface.- Parameters:
cardSidePlayable
- side of the playable card that gives these points to the playerfield
- Field of the player for whom you want to calculate the points given by the card objective.- Returns:
- number of points the player gets after playing the card side
-
getPointsMultiplier
int getPointsMultiplier()Return the points multiplier. In other words, the number of points which appears on the card.- Returns:
- Points multiplier
-
getPointsResource
Resource getPointsResource()Return the required resource to get points by playing the card.- Returns:
- Resource required
-
isCornerTypePoints
boolean isCornerTypePoints()Returns true if the number of points is conditioned to the number of angles the card covers.- Returns:
- true if PointsCorner, false otherwise
-