Package rea.gaming

Enum Class Action

All Implemented Interfaces:
Serializable, Comparable<Action>, Constable

public enum Action extends Enum<Action>
The actions that the player can do in the game.
Author:
José Paulo Leal jpleal@fc.up.pt
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Move to the previous place.
    Drop an item from the inventory to the scene.
    Hold an item, either from the inventory or from the scene, to then use it.
    Look at the selected object in the scene to receive its description.
    Move to another position in the same place, or to a different place.
    Pick an item from the scene and save it in the inventory.
    Talk to every character in the scene.
    Use the item your holding on the seleted object in the scene.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the action name as a title.
    static Action
    Returns the enum constant of this class with the specified name.
    static Action[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

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

    • MOVE

      public static final Action MOVE
      Move to another position in the same place, or to a different place.
    • BACK

      public static final Action BACK
      Move to the previous place.
    • PICK

      public static final Action PICK
      Pick an item from the scene and save it in the inventory.
    • DROP

      public static final Action DROP
      Drop an item from the inventory to the scene.
    • HOLD

      public static final Action HOLD
      Hold an item, either from the inventory or from the scene, to then use it.
    • USE

      public static final Action USE
      Use the item your holding on the seleted object in the scene.
    • TALK

      public static final Action TALK
      Talk to every character in the scene.
    • LOOK

      public static final Action LOOK
      Look at the selected object in the scene to receive its description.
  • Method Details

    • values

      public static Action[] 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 Action 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
    • getTitle

      public String getTitle()
      Get the action name as a title. The first letter is capitalized and the following letters are in lower case. (e.g. "Move" for MOVE).
      Returns:
      the title of the action.