Enum Class SlotEngine.Effect

java.lang.Object
java.lang.Enum<SlotEngine.Effect>
com.csse3200.game.components.slot.SlotEngine.Effect
All Implemented Interfaces:
Serializable, Comparable<SlotEngine.Effect>, Constable
Enclosing class:
SlotEngine

public static enum SlotEngine.Effect extends Enum<SlotEngine.Effect>
Enumeration of all possible effects. Each effect has a stable id (0..7) and a display name for logging/debugging.
  • Enum Constant Details

  • Method Details

    • values

      public static SlotEngine.Effect[] 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 SlotEngine.Effect 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
    • getId

      public int getId()
      Returns:
      Stable id of the effect (0..7).
    • getDisplayName

      public String getDisplayName()
      Returns:
      Readable display name for logging.
    • getDefaultWeight

      public int getDefaultWeight()
    • fromId

      public static SlotEngine.Effect fromId(int id)
      Convert an integer id to Effect enum.