Enum DieReason

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DieReason>

    public enum DieReason
    extends java.lang.Enum<DieReason>
    Enumeration for energyloss and death reasons during game.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      blackened
      Death by entering a hole.
      bombed
      Death because of picking up bombs or exploding items.
      energyloss
      Energy losses caused by ItemEnergyLosses.
      exhausted
      Destruction e.g. by being using up
      explosion
      Loss by an explosion.
      grayed
      Energy losses caused by gray points.
      none
      No value.
      overheated
      Loss because of overheating.
      rammed
      Loss by ram attacks.
      rocket
      Loss by a directly hitting rocket.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DieReason valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static DieReason[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • rocket

        public static final DieReason rocket
        Loss by a directly hitting rocket.
      • explosion

        public static final DieReason explosion
        Loss by an explosion.
      • rammed

        public static final DieReason rammed
        Loss by ram attacks.
      • blackened

        public static final DieReason blackened
        Death by entering a hole.
      • exhausted

        public static final DieReason exhausted
        Destruction e.g. by being using up
      • energyloss

        public static final DieReason energyloss
        Energy losses caused by ItemEnergyLosses.
      • grayed

        public static final DieReason grayed
        Energy losses caused by gray points.
      • bombed

        public static final DieReason bombed
        Death because of picking up bombs or exploding items.
      • overheated

        public static final DieReason overheated
        Loss because of overheating.
      • none

        public static final DieReason none
        No value.
    • Method Detail

      • values

        public static DieReason[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DieReason c : DieReason.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DieReason 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