Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
C
D
E
G
H
I
L
M
N
P
R
S
T
W
C
createWorldMap(int, int)
- Static method in class
WorldMap
Initialize the world map to have size (x,y) and create the Window for it.
Creature
- Class in
<Unnamed>
This class represents one creature on the board.
Creature(Species, World<Creature>, Position, int)
- Constructor for class
Creature
Create a creature of the given species, with the indicated position and direction.
D
direction()
- Method in class
Creature
Return the current direction of the creature.
displaySquare(Position, char, int, String)
- Static method in class
WorldMap
Update the contents of the square indicated by pos.
E
EAST
- Static variable in class
Position
The East compass point.
G
get(Position)
- Method in class
World
Return the contents of a position on the board.
getAddress()
- Method in class
Instruction
Returns the addrss
getAdjacent(int)
- Method in class
Position
Return a new position that is in one of the four compass directions from this.
getColor()
- Method in class
Species
Return the color of the species.
getName()
- Method in class
Species
Return the name of the species.
getOpcode()
- Method in class
Instruction
Returns the opcode
getX()
- Method in class
Position
Return the x coordinate for the position.
getY()
- Method in class
Position
Return the y coordinate for the position.
GO
- Static variable in class
Instruction
opcode for the go instruction
H
height()
- Method in class
World
Returns the height of the world.
HOP
- Static variable in class
Instruction
opcode for the hop instruction
I
IFEMPTY
- Static variable in class
Instruction
opcode for the ifempty instruction
IFENEMY
- Static variable in class
Instruction
opcode for the ifenemy instruction
IFRANDOM
- Static variable in class
Instruction
opcode for the ifrandom instruction
IFSAME
- Static variable in class
Instruction
opcode for the ifsame instruction
IFWALL
- Static variable in class
Instruction
opcode for the ifwall instruction
INFECT
- Static variable in class
Instruction
opcode for the infect instruction
Instruction
- Class in
<Unnamed>
This class represents one Darwin instruction.
Instruction(int, int)
- Constructor for class
Instruction
Creates a new instruction.
L
LEFT
- Static variable in class
Instruction
opcode for the left instruction
leftFrom(int)
- Static method in class
Creature
Return the compass direction the is 90 degrees left of the one passed in.
M
main(String[])
- Static method in class
Creature
This main program reads in one species, creates one creature, and gives it twenty turns.
main(String[])
- Static method in class
Species
N
NORTH
- Static variable in class
Position
The North compass point.
P
pause(int)
- Static method in class
WorldMap
Pause for millis milliseconds.
position()
- Method in class
Creature
Return the position of the creature.
Position
- Class in
<Unnamed>
A Position is an (x,y) coordinate in the World, much like the Positions for the maze program.
Position(int, int)
- Constructor for class
Position
Create a new position for the given x and y coordinates.
programSize()
- Method in class
Species
Return the number of instructions in the program.
programStep(int)
- Method in class
Species
Return an instruction from the program.
programToString()
- Method in class
Species
Return a String representation of the program.
R
RIGHT
- Static variable in class
Instruction
opcode for the right instruction
rightFrom(int)
- Static method in class
Creature
Return the compass direction the is 90 degrees right of the one passed in.
S
set(Position, E)
- Method in class
World
Set a position on the board to contain c.
SOUTH
- Static variable in class
Position
The South compass point.
species()
- Method in class
Creature
Return the species of the creature.
Species
- Class in
<Unnamed>
The individual creatures in the world are all representatives of some species class and share certain common characteristics, such as the species name and the program they execute.
Species(String)
- Constructor for class
Species
Create a species for the given file.
T
takeOneTurn()
- Method in class
Creature
Execute steps from the Creature's program until a hop, left, right, or infect instruction is executed.
toString()
- Method in class
Instruction
Returns a printable representation of an Instruction
toString()
- Method in class
Position
toString()
- Method in class
Species
W
WEST
- Static variable in class
Position
The West compass point.
width()
- Method in class
World
Returns the width of the world.
World
<
E
> - Class in
<Unnamed>
This module includes the functions necessary to keep track of the creatures in a two-dimensional world.
World(int, int)
- Constructor for class
World
This function creates a new world consisting of width columns and height rows, each of which is numbered beginning at 0.
WorldMap
- Class in
<Unnamed>
This class exports the methods necessary to display the creatures on the screen.
WorldMap()
- Constructor for class
WorldMap
C
D
E
G
H
I
L
M
N
P
R
S
T
W
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes