|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Operator> org.holtz.zoe.Operator
public enum Operator
The verb of an Operation
in a Zoel
program.
Enum Constant Summary | |
---|---|
AbsoluteVal
|
|
Add
|
|
And
|
|
Barf
Barf up some energy to leave at the current location. |
|
Bite
Bite energy from the nearest ZObject. |
|
Call
Branch to the indicated Statement, and return at the end of its StatementList or when it Returns. |
|
Divide
|
|
Else
If stack top is false (zero/empty), evaluate arg. |
|
Equals
|
|
Feel
Sense the nearest ZObject within MaxBiteRange and mass > InvisibilityThreshold * own mass. |
|
Get
Copy a heap value to the stack, where arg is the map key. |
|
GreaterThan
|
|
IfThen
If stack top is true (nonzero/nonempty), evaluate arg. |
|
LessThan
|
|
Look
Sense the nearest ZObject within MaxLookRange and mass > InvisibilityThreshold * own mass. |
|
Mate
Exchange genes with the nearest visible bug that is within Feel range. |
|
Modulus
|
|
Mood
Copy the arg (or stack top) to the Mood register. |
|
Move
Move forward along $Heading. |
|
Multiply
|
|
Negate
|
|
Not
|
|
Or
|
|
Poke
Set the top of the stack. |
|
Pop
Pop the top off the stack. |
|
Pray
Send a message to the gods. |
|
Push
Push the arg onto the stack. |
|
Random
|
|
Return
Return to the Statement after the corresponding Call, or break from the enclosing While. |
|
Set
Set a mapping in the heap, where arg is the map key and the stack top is the value. |
|
Spawn
Attempt to spawn a child using only available strength. |
|
Split
Attempt to split into a parent and child of equal size and strength. |
|
Subtract
|
|
Turn
Turn to a different direction in order to Move that way. |
|
While
While stack top is true (nonzero/nonempty), evaluate arg. |
Method Summary | |
---|---|
static Operator |
fromString(java.lang.String str)
|
static Operator |
pseudoRandom(java.util.Random random)
|
static Operator |
random(java.util.Random random)
|
static Operator |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Operator[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
ZoelVM.Turn |
whetherTurnContinues()
|
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 |
---|
public static final Operator Move
public static final Operator Turn
public static final Operator Bite
public static final Operator Barf
public static final Operator Spawn
public static final Operator Split
public static final Operator Mate
public static final Operator Feel
public static final Operator Look
public static final Operator Mood
public static final Operator Pray
public static final Operator Call
public static final Operator Return
public static final Operator IfThen
public static final Operator Else
public static final Operator While
public static final Operator Push
public static final Operator Pop
public static final Operator Poke
public static final Operator Set
public static final Operator Get
public static final Operator And
public static final Operator Or
public static final Operator Not
public static final Operator Negate
public static final Operator Equals
public static final Operator LessThan
public static final Operator GreaterThan
public static final Operator Random
public static final Operator Add
public static final Operator Subtract
public static final Operator Multiply
public static final Operator Divide
public static final Operator Modulus
public static final Operator AbsoluteVal
Method Detail |
---|
public static Operator[] values()
for (Operator c : Operator.values()) System.out.println(c);
public static Operator valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic ZoelVM.Turn whetherTurnContinues()
public static Operator fromString(java.lang.String str)
public static Operator random(java.util.Random random)
public static Operator pseudoRandom(java.util.Random random)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |