Package it.polimi.ingsw.model.leadercard
Class DiscountBehaviour
java.lang.Object
it.polimi.ingsw.model.leadercard.CardBehaviour
it.polimi.ingsw.model.leadercard.DiscountBehaviour
public class DiscountBehaviour extends CardBehaviour
The CardBehaviour that represents the discount behaviour: a leader card with this behaviour will reduce the develop card price
-
Constructor Summary
Constructors Constructor Description DiscountBehaviour(ResourceType resourceToDiscount) -
Method Summary
Modifier and Type Method Description voiddiscount(java.util.HashMap<ResourceType,java.lang.Integer> resources)applies discount to the map passed as a parameter NOTE: the method modifies the map passed as a parameter in order to apply the discount does nothing if the card doesn't have this abilityResourceTypegetResourceToDiscount()Methods inherited from class it.polimi.ingsw.model.leadercard.CardBehaviour
createStorage, getOnWhite, getProductionRequirement, getResToStore, produceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DiscountBehaviour
-
-
Method Details
-
discount
Description copied from class:CardBehaviourapplies discount to the map passed as a parameter NOTE: the method modifies the map passed as a parameter in order to apply the discount does nothing if the card doesn't have this ability- Overrides:
discountin classCardBehaviour- Parameters:
resources- the resource map to be discounted
-
getResourceToDiscount
- Overrides:
getResourceToDiscountin classCardBehaviour
-