darwin.domain
Interface Species

All Known Implementing Classes:
MySpecies

public interface Species

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. Rather than copy this information into each creature, this data can be recorded once as part of the description for a species and then each creature can simply include the appropriate species reference as part of its internal data structure.


Method Summary
 java.lang.String getColor()
          Determine the color of this Species.
 java.lang.String getName()
          Determine the name of this Species.
 int getProgramSize()
          Determine the number of instructions in the Program for this Species.
 Instruction getProgramStep(int aStep)
          Determine an Instruction from the Program for this Species.
 

Method Detail

getColor

public java.lang.String getColor()
Determine the color of this Species.

Returns:
the color of this Species.

getName

public java.lang.String getName()
Determine the name of this Species.

Returns:
the name of this Species.

getProgramSize

public int getProgramSize()
Determine the number of instructions in the Program for this Species.

Returns:
the number of instructions in the Program for this Species.

getProgramStep

public Instruction getProgramStep(int aStep)
Determine an Instruction from the Program for this Species.

Parameters:
aStep - the step number for the Instruction. 1 <= aStep <= getProgramSize().
Returns:
the Instruction at aStep of the Program for this Species.