jurpe.dungeon.crawler
Enum Instruction

java.lang.Object
  extended by java.lang.Enum<Instruction>
      extended by jurpe.dungeon.crawler.Instruction
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Instruction>

public enum Instruction
extends java.lang.Enum<Instruction>

Instruction constants that represent the key-commands issued by a player. Every instruction can be mapped to a particular key


Enum Constant Summary
CLOSE
           
DIG
           
ENTER
           
OPEN
           
PICKUP
           
RUN
           
UNKNOWN
           
WALK
           
 
Method Summary
 short getInstuctionID()
           
static Instruction valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Instruction[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WALK

public static final Instruction WALK

RUN

public static final Instruction RUN

DIG

public static final Instruction DIG

UNKNOWN

public static final Instruction UNKNOWN

ENTER

public static final Instruction ENTER

OPEN

public static final Instruction OPEN

CLOSE

public static final Instruction CLOSE

PICKUP

public static final Instruction PICKUP
Method Detail

values

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

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

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

getInstuctionID

public short getInstuctionID()

Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net