Enum ActionType

java.lang.Object
java.lang.Enum<ActionType>
it.polimi.ingsw.controller.action.ActionType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ActionType>, java.lang.constant.Constable

public enum ActionType
extends java.lang.Enum<ActionType>
All the possible type of action: they are necessary for json serialization
  • Enum Constant Details

    • PLAYER_DISCONNECTION

      public static final ActionType PLAYER_DISCONNECTION
    • PLAYER_RECONNECTION

      public static final ActionType PLAYER_RECONNECTION
    • SETUP_CHOOSE_RESOURCES

      public static final ActionType SETUP_CHOOSE_RESOURCES
    • SETUP_DISCARD_LEADERS

      public static final ActionType SETUP_DISCARD_LEADERS
    • PRODUCE

      public static final ActionType PRODUCE
    • BASE_PRODUCE

      public static final ActionType BASE_PRODUCE
    • LEADER_PRODUCE

      public static final ActionType LEADER_PRODUCE
    • SHOP_MARKET

      public static final ActionType SHOP_MARKET
    • BUY_CARD

      public static final ActionType BUY_CARD
    • DISCARD_LEADER

      public static final ActionType DISCARD_LEADER
    • END_TURN

      public static final ActionType END_TURN
    • ACTIVATE_LEADER

      public static final ActionType ACTIVATE_LEADER
    • INSERT_MARBLE

      public static final ActionType INSERT_MARBLE
    • CHOOSE_WHITE_LEADER

      public static final ActionType CHOOSE_WHITE_LEADER
  • Method Details

    • values

      public static ActionType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ActionType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • fromValue

      public static ActionType fromValue​(java.lang.String value)
      static factory method that constructs enum by string
      Parameters:
      value - string to create the enum
      Returns:
      a new enumeration