A B C D E F G H I K L M N O P R S T U V W 

A

accumulateFrom(Simulator.Species) - Method in class Simulator.Species
 
APPLE_CLASS_ID - Static variable in class Creature
The class ID for an Apple.
ASCENSION_SCORE - Static variable in class Tournament
 
ascensions - Variable in class Simulator.Species
 
attack() - Method in class Creature
Attack the creature right in front of you.
attack(Creature) - Method in class Simulator
Attack the creature in front of this one.
ATTACK_COST - Static variable in class Simulator
 
attackCount - Variable in class Simulator.Species
Total number of attack actions
attackPercent() - Method in class Simulator.Species
 

B

beginSecureExecution() - Static method in class Simulator
Turns on the MaximumSecurityManager and prevents Observations from containing classNames.
bytes - Variable in class Simulator.Species
Size of the bytecode for this creature.

C

classId - Variable in class Observation
Class ID (versus object ID) for the kind of object observed.
classId - Variable in class Simulator.Species
 
className - Variable in class Observation
If Observation.type == CREATURE, this is the class name of that creature.
computePercent() - Method in class Simulator.Species
Percentage of time spent by this creature in computation [0, 100]
computeTime - Variable in class Simulator.Species
Total (virtual) compute time in nanoseconds spent by all creatures of this type.
ConvertedError - Error in <Unnamed>
Thrown by Simulator when a Creature that has been converted to another species attempts to take an action.
ConvertedError(String) - Constructor for error ConvertedError
 
Creature - Class in <Unnamed>
Extend this class to create your own Creature.
Creature() - Constructor for class Creature
Subclass constructors must not invoke any of the parent class methods from their constructor.
creatureClass - Variable in class Simulator.Species
 

D

Darwin - Class in <Unnamed>
Graphical display of the Darwin Game 2.1 simulator for single matches.
Darwin(boolean, String, String[], boolean) - Constructor for class Darwin
Construct a new instance of the Darwin GUI.
delay() - Method in class Creature
Execute the delay action.
delay(int) - Method in class Creature
Execute the delay action n times in a row
delay(Creature) - Method in class Simulator
Take the delay action
DELAY_COST - Static variable in class Simulator
 
Direction - Enum in <Unnamed>
Cardinal direction on a grid.
direction - Variable in class Observation
If Observation.type == CREATURE, this is the direction that creature is facing, otherwise, null.
distance(Point) - Method in class Creature
Returns the Manhattan distance from current position to p2.
distance(Point, Point) - Static method in class Creature
Returns the Manhattan distance between p1 and p2
DOMINATION_SCORE - Static variable in class Tournament
 

E

EMIT_PHEROMONE_COST - Static variable in class Simulator
 
emitCount - Variable in class Simulator.Species
Total number of emitPheromone actions
emitPercent() - Method in class Simulator.Species
 
emitPheromone(String) - Method in class Creature
Emit a pheromone onto this creature's current location.
emitPheromone(Creature, String) - Method in class Simulator
 
EMPTY_CLASS_ID - Static variable in class Creature
The class ID for an empty space on the map.
equals(Object) - Method in class Creature
Uses the pointer comparision from Object.
equals(Object) - Method in class Observation
The classNames are not required to match, but all other fields must.
EXHAUSTION_MAJORITY_SCORE - Static variable in class Tournament
 
EXHAUSTION_SURVIVAL_SCORE - Static variable in class Tournament
 

F

FLYTRAP_CLASS_ID - Static variable in class Creature
The class ID for a Flytrap.
FOG_MOVE_FORWARD_PENTALTY_COST - Static variable in class Simulator
The additional cost of a move forward operation that enters fog.
forward(Point) - Method in enum Direction
The point one step forward in this direction.
forward(Point, int) - Method in enum Direction
The point n steps forward in this direction.
forward(Point, int, Point) - Method in enum Direction
Computes the point n steps forward in this direction, saves it to overwrite, and then returns overwrite.
fromInt(int) - Static method in enum Direction
 
fromTo(Point, Point) - Static method in enum Direction
Returns the larger direction from a to b, favoring the vertical.

G

getAuthorName() - Method in class Creature
Allows GUI browsers to display your name as author of this creature.
getClassId() - Method in class Creature
Each creature species is assigned a unique class ID for each trial, except Treasure, Apple, and Flytrap, which always have the same values.
getClassName() - Method in class Creature
Name of this species of creature.
getComputeTimeSinceSpawn(Creature) - Method in class Simulator
 
getCreature(int, int) - Method in class Simulator
Returns the creature at x, y on the grid.
getCreatureColor(Class) - Method in class Simulator
 
getCreatureColor(int) - Method in class Simulator
 
getCreatureCount(Class) - Method in class Simulator
Returns the number of creatures of this species alive in the map.
getDescription() - Method in class Creature
Allows GUI browsers to display information and credits about your creature.
getDimensions() - Method in class Simulator
Returns the size of the map.
getDirection() - Method in class Creature
Direction this creature is facing.
getDirection(Creature) - Method in class Simulator
Throws a ConvertedError if the Creature is not in the world.
getGameTime() - Method in class Creature
Returns the time in virtual nanoseconds since the simulation started.
getIconHeight() - Method in class Simulator
 
getIconHeight() - Method in class Tournament
 
getIconWidth() - Method in class Simulator
 
getIconWidth() - Method in class Tournament
 
getId() - Method in class Creature
Each creature has a unique number that it can use to distinguish itself from others.
getImage(Creature, Direction) - Static method in class Simulator
 
getImage(Class, Direction) - Static method in class Simulator
Returns the image for this Creature subclass.
getInfo() - Method in class Simulator
Returns a description of the simulator
getIntraTurnTime() - Method in class Simulator
Returns the wall-clock time of waitBetweenTurns() in nanoseconds.
getLabel() - Method in class Creature
Used by Simulator for labeling the icons in 2D render mode.
getMapDimensions() - Method in class Creature
Returns the size of the map.
getMostCommonColor(Map<Integer, Integer>) - Static method in class Simulator
 
getMovePosition(int) - Method in class Creature
The coordinates of the next position this Creature will enter if it moves n times, regardless of whether that position is currently empty.
getMovePosition() - Method in class Creature
Same as Creature.getMovePosition(int) with the argument n = 1
getMyTimeSinceSpawn() - Method in class Creature
The time in virtual nanoseconds that this Creature has spent in actions and computing since it spawned.
getNaturalHeight() - Method in class Simulator
 
getNaturalWidth() - Method in class Simulator
 
getNumSpeciesLeft() - Method in class Simulator
Returns the number of different species left alive, excluding Flytraps.
getPheromone() - Method in class Creature
Returns the pheromone at this creature's current location.
getPheromone(Creature) - Method in class Simulator
Throws a ConvertedError if the Creature is not in the world.
getPosition() - Method in class Creature
Returns the position of this Creature.
getPosition(Creature) - Method in class Simulator
Clones the position.
getResult() - Method in class Simulator
Returns a description of the final outcome, or null if the game has not yet ended.
getSound(Creature, Simulator.Condition) - Static method in class Simulator
Returns the appropriate sound for this creature.
getSound(Class, Simulator.Condition) - Static method in class Simulator
 
getTime() - Method in class Creature
Deprecated.
Use getGameTime instead
getTime(Creature) - Method in class Simulator
Total time for this creature; on spawn, this is inherited from the parent.
getTime() - Method in class Simulator
Returns the number of virtual milliseconds since the game began.
getTitle() - Method in class Simulator
Name of this map
getToolTip(Point) - Method in class Simulator
Assumes that p is in bounds
getTotalTimeSinceSpawn(Creature) - Method in class Simulator
 
getTurns(Creature) - Method in class Simulator
Returns the number of turns this creature has taken.
getTurnTime() - Method in class Creature
Returns the time in virtual nanoseconds since this creature's current turn started.
getTurnTime() - Method in class Simulator
Returns the time in virtual nanoseconds since the current creature's current turn started.
getType() - Method in class Creature
 
getVersion() - Static method in class Darwin
Reports the simulator version number.
getVersion() - Static method in class Simulator
Reports the version of this simulator.
getView3D() - Method in class Simulator
 

H

hashCode() - Method in class Creature
Uses the pointer hashCode from Object.
hashCode() - Method in class Observation
 
HAZARD_CLASS_ID - Static variable in class Creature
 

I

icon - Variable in class Simulator.Result
Image of the winner
id - Variable in class Observation
If Observation.type == CREATURE, this is the ID of that creature.
inFog() - Method in class Creature
Returns true if this creature's current location is in fog.
inFog - Variable in class Observation
Fog is an experimental feature and will never appear in a tournament map in 2012.
inFog(Creature) - Method in class Simulator
Returns true if the Creature's current location is in fog.
inMud() - Method in class Creature
Returns true if this creature's current location is in mud.
inMud - Variable in class Observation
 
inMud(Creature) - Method in class Simulator
Returns true if the Creature's current location is in mud.
isAlive(Creature) - Method in class Simulator
A creature's thread can't be stopped without potentially releasing locks that it is using for synchronization, so this method tells a creature when it should die.
isEnchanted() - Method in class Creature
Returns true if this creature is enchanted.
isEnchanted(Creature) - Method in class Simulator
Throws a ConvertedError if the Creature is not in the world.
isEnemy(Observation) - Method in class Creature
Returns true if this observation describes a Creature that is not of this species, including Flytrap, Apple, and Treasure.
isHorizontal() - Method in enum Direction
True for East and West
isRunning() - Method in class Simulator
True while the simulation is running (not stopped).
isSecure() - Method in class Darwin
 
isVertical() - Method in enum Direction
True for North and South

K

KILL_TIME - Static variable in class Simulator
Any creature that takes more wall-clock time than this is automatically converted into an Apple (killed).

L

left(int) - Method in enum Direction
The direction 90*n-degrees to the left.
left() - Method in enum Direction
The direction 90-degrees to the left.
loadClass(String, boolean) - Static method in class Simulator
Loads a class in its own Sandbox.
look() - Method in class Creature
Deprecated.
returns the first element of observe(). Provided for backwards compatibility.
LOOK_COST - Static variable in class Simulator
Deprecated. 
LOSE_SCORE - Static variable in class Tournament
 

M

main(String[]) - Static method in class Darwin
 
main(String[]) - Static method in class Tournament
 
makeToggleToolButton(String) - Static method in class Darwin
 
makeToolButton(String) - Static method in class Darwin
 
MILLISECONDS - Static variable in class Simulator
One millisecond in nanoseconds.
move(Creature, int) - Method in class Simulator
Moves this creature forward if the space in front if it is empty, otherwise does not move.
MOVE_BACKWARD_COST - Static variable in class Simulator
 
MOVE_FORWARD_COST - Static variable in class Simulator
 
moveBackward(int) - Method in class Creature
Execute the moveBackward action n times in a row.
moveBackward() - Method in class Creature
Call to move your creature backward 1 square without changing its facing direction.
moveCount - Variable in class Simulator.Species
Total number of move actions
moveForward(int) - Method in class Creature
Execute the moveForward action n times in a row.
moveForward() - Method in class Creature
Call to move your creature forward 1 square.
movePercent() - Method in class Simulator.Species
 
MUD_PENALTY_COST - Static variable in class Simulator
Additional cost for moving, turning, or attacking while in mud.
myClassId() - Method in class Creature
Synonym for Creature.getClassId() to make Creature subclasses more readable.
myId() - Method in class Creature
Synonym for Creature.getId() to make Creature subclasses more readable.
MZ_TIME_LIMIT - Static variable in class Simulator
A maze game ends after this many virtual nanoseconds, even if no Creature has won.

N

nanoSleep(long) - Static method in class Simulator
On some systems, Thread.sleep(long, int) has a minimum sleep time of 1ms.
NS_ASCENSIONS_TO_WIN - Static variable in class Simulator
 
NS_TIME_LIMIT - Static variable in class Simulator
A non-maze game ends after this many virtual nanoseconds, even if no Creature has won.
numTurns(Direction) - Method in enum Direction
The number of turns needed to reach direction d from this direction.

O

Observation - Class in <Unnamed>
Observation(int, int, long) - Constructor for class Observation
Empty observation
Observation(Point, long) - Constructor for class Observation
Empty observation
Observation(Point, long, boolean, boolean, int) - Constructor for class Observation
 
Observation(Point, Type, int, long) - Constructor for class Observation
Cannot be used to make a creature observation.
Observation(Point, Type, int, long, boolean, boolean, int) - Constructor for class Observation
Cannot be used to make a creature observation.
Observation(Point, String, int, int, Direction, long) - Constructor for class Observation
 
Observation(Point, String, int, int, Direction, long, boolean, boolean, int) - Constructor for class Observation
 
observe() - Method in class Creature
Observe all locations that are visible to this creature.
observe(Creature) - Method in class Simulator
 
OBSERVE_COST - Static variable in class Simulator
 
observeCount - Variable in class Simulator.Species
Total number of observe actions
observePercent() - Method in class Simulator.Species
 
observeSelf() - Method in class Creature
Create an observation describing this creature.
onDeath() - Method in class Creature
Called by the simulator on a creature that has is about to die, to give it an opportunity to communicate with other members of its species before it is removed from the game.
opposite() - Method in enum Direction
Returns the direction 180 degrees from this one.

P

paintIcon(Component, Graphics, int, int) - Method in class Simulator
 
paintIcon(Component, Graphics, int, int) - Method in class Tournament
 
position - Variable in class Observation
Point that was observed.

R

random() - Static method in enum Direction
Uniformly distributed random direction.
random(Random) - Static method in enum Direction
Uniformly distributed random direction.
readMapTitle(String) - Static method in class Simulator
 
result - Variable in class Simulator.Result
 
resultCode - Variable in class Simulator.Species
 
right(int) - Method in enum Direction
The direction 90*n-degrees to the right.
right() - Method in enum Direction
The direction 90-degrees to the right.
run() - Method in class Creature
Override this method to make your creature think and move.
run() - Method in class Simulator.QuietRunnable
 
runQuiet() - Method in class Simulator.QuietRunnable
override this

S

SCALE_2D - Static variable in class Simulator
2D grid size in pixels.
screenPointToLocation(int, int) - Method in class Simulator
Returns the location under the position (x, y) if in 2D mode and in bounds, and null otherwise
SECONDS - Static variable in class Simulator
One second in nanoseconds.
setIntraTurnTime(long) - Method in class Simulator
Set the wall-clock time to wait between turns in nanoseconds.
setSelectedCreature(Creature) - Method in class Simulator
 
setView3D(boolean) - Method in class Simulator
If true, the view renders in 3D
sharedClasses - Static variable in class Simulator
Shared between ClassLoader (Sandbox) instances
shortName(String) - Static method in class Simulator
Strips the capital letters off the right of a creature name.
shrineClassId() - Method in class Creature
If this creature is on a shrine, returns the classID of the creatures that own the shrine.
shrineClassId - Variable in class Observation
Creature.UNINITIALIZED_CLASS_ID if this is not a shrine, or the classID for the creature owning the shrine
shrineClassId(Creature) - Method in class Simulator
If this creature is on a shrine, returns the classID of the creatures that own the shrine.
Simulator - Class in <Unnamed>
Darwin 2.1 simulator.
Simulator(String, Class[]) - Constructor for class Simulator
Loads the specified map, instantiating each of the creatures for the numbered spots in the map.
Simulator.Condition - Enum in <Unnamed>
 
Simulator.QuietRunnable - Class in <Unnamed>
A version of Runnable that suppresses output
Simulator.QuietRunnable() - Constructor for class Simulator.QuietRunnable
 
Simulator.Result - Class in <Unnamed>
Return value of Simulator.getResult()
Simulator.Result(String, Class, String, Image, long, Map<Class, Simulator.Species>) - Constructor for class Simulator.Result
 
Simulator.Result.Code - Enum in <Unnamed>
 
Simulator.Species - Class in <Unnamed>
Aggregate information about the performance of an entire species
Simulator.Species(Class, int) - Constructor for class Simulator.Species
 
species - Variable in class Simulator.Result
One of the winning species, null if none.
speciesStats - Variable in class Simulator.Result
Data about each species
start(String, Class[]) - Method in class Simulator
Load a new map and start a simulation.
stop() - Method in class Simulator
End simulation, without destroying final state.
SYNTAX_HELP - Static variable in class Darwin
 

T

THORN - Static variable in class Creature
Deprecated.
Old name for HAZARD
THORN - Static variable in enum Type
Deprecated.
Old name for HAZARD
THORN_CLASS_ID - Static variable in class Creature
Deprecated.
Old name for HAZARD_CLASS_ID
time - Variable in class Observation
Value returned from Creature.getGameTime() when this observation was made.
timeLimit() - Method in class Simulator
Total time allowed in virtual nanoseconds for the game on the current map.
timeSteps - Variable in class Simulator.Result
Game time in virtual nanoseconds at which the result occured.
toInt() - Method in enum Direction
Returns a number between 0 and 3: NORTH = 0, EAST = 1, ...
toInt() - Method in enum Simulator.Condition
 
toString(Point) - Static method in class Creature
Prints a point to a string concisely.
toString() - Method in class Observation
 
toString() - Method in class Simulator.Result
 
toString() - Method in class Simulator.Species
 
toString() - Method in class Simulator
Returns a printable text representation of the map
totalActions() - Method in class Simulator.Species
 
totalTime - Variable in class Simulator.Species
Total time spent in actions and compute for all creatures of this type, in nanoseconds.
Tournament - Class in <Unnamed>
Graphical display and management of Darwin Game tournaments.
Tournament(String, String[]) - Constructor for class Tournament
 
TREASURE_CLASS_ID - Static variable in class Creature
The class ID for a Treasure.
TURN_COST - Static variable in class Simulator
 
turnCount - Variable in class Simulator.Species
Total number of turn actions
turnLeft() - Method in class Creature
Rotate counter-clockwise 90 degrees.
turnLeft(Creature) - Method in class Simulator
 
turnPercent() - Method in class Simulator.Species
 
turnRight() - Method in class Creature
Rotate clockwise 90 degrees.
turnRight(Creature) - Method in class Simulator
Called by a creature to turn
type - Variable in class Observation
Type of object at this location.
Type - Enum in <Unnamed>
Types of Entitys that can be in a location.

U

UNINITIALIZED_CLASS_ID - Static variable in class Creature
An illegal, uninitialized value distinct from an empty square.
UNKNOWN_CREATURE_CLASS_ID - Static variable in class Creature
A class ID reserved for use by Creature subclasses.

V

valueOf(String) - Static method in enum Direction
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum Simulator.Condition
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum Simulator.Result.Code
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum Type
Returns the enum constant of this type with the specified name.
values() - Static method in enum Direction
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum Simulator.Condition
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum Simulator.Result.Code
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum Type
Returns an array containing the constants of this enum type, in the order they are declared.

W

WALL_CLASS_ID - Static variable in class Creature
 
why - Variable in class Simulator.Result
Explanation of why the game ended.
A B C D E F G H I K L M N O P R S T U V W