Class AssistantCard

java.lang.Object
it.polimi.ingsw.Model.AssistantCard
All Implemented Interfaces:
Serializable

public class AssistantCard extends Object implements Serializable
This class represents one of the 10 player owned assistant cards
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private static final long
     
    private boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AssistantCard(int priority)
    Constructs an Assistant card based on its priority.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Every card has a maximum value for the movement to use in MoveMotherNature
    int
    Returns the priority of turn linked to the use of the card.
    boolean
    If a card is used in a turn by the player, this flag must be set to true.
    void
    If a card is used in a turn by the player, this flag must be set to true.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • priority

      private final int priority
    • used

      private boolean used
  • Constructor Details

    • AssistantCard

      public AssistantCard(int priority)
      Constructs an Assistant card based on its priority.
      Parameters:
      priority - the priority of the card
  • Method Details

    • getMaxMovement

      public int getMaxMovement()
      Every card has a maximum value for the movement to use in MoveMotherNature
      Returns:
      an integer value representing max mother nature movement
    • getPriority

      public int getPriority()
      Returns the priority of turn linked to the use of the card.
      Returns:
      an integer value representing priority
    • getUsed

      public boolean getUsed()
      If a card is used in a turn by the player, this flag must be set to true.
      Returns:
      the used flag of the card
    • setUsed

      public void setUsed()
      If a card is used in a turn by the player, this flag must be set to true.
      Use this function to set the value to true. Keep in mind there is no way to revert this flag once set.