Enum Class EventType

java.lang.Object
java.lang.Enum<EventType>
it.polimi.ingsw.gc14.Network.EventType
All Implemented Interfaces:
Serializable, Comparable<EventType>, Constable

public enum EventType extends Enum<EventType>
Represents the different types of network events that can be sent between client and server.
  • Enum Constant Details

    • ADD_PLAYER

      public static final EventType ADD_PLAYER
      Event used to add a player to the game.
    • TOTEM_CHOICE

      public static final EventType TOTEM_CHOICE
      Event used to submit a player's totem choice.
    • SLOT_CHOICE

      public static final EventType SLOT_CHOICE
      Event used to submit a player's slot choice.
    • DRAW_UPPER_TRIBE

      public static final EventType DRAW_UPPER_TRIBE
      Event used to draw a tribe card from the upper card list.
    • DRAW_LOWER_TRIBE

      public static final EventType DRAW_LOWER_TRIBE
      Event used to draw a tribe card from the lower card list.
    • DRAW_UPPER_BUILD

      public static final EventType DRAW_UPPER_BUILD
      Event used to draw a building card from the upper card list.
    • DRAW_LOWER_BUILD

      public static final EventType DRAW_LOWER_BUILD
      Event used to draw a building card from the lower card list.
    • SKIP_TURN

      public static final EventType SKIP_TURN
      Event used to skip the current turn or optional action.
    • DISCONNECTED_PLAYER

      public static final EventType DISCONNECTED_PLAYER
      Event used to notify that a player has disconnected.
    • RECONNECT_PLAYER

      public static final EventType RECONNECT_PLAYER
      Event used to notify that a player has reconnected.
    • NEXT_ROUND

      public static final EventType NEXT_ROUND
      Event used to apply the transition to the next round.
    • ENDED_GAME

      public static final EventType ENDED_GAME
      Event used to notify that the game has ended.
  • Field Details

    • description

      private final String description
      Human-readable label for this event type, returned by toString().
  • Constructor Details

    • EventType

      private EventType(String description)
  • Method Details

    • values

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

      public static EventType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<EventType>