morey.spore
Class Type

java.lang.Object
  |
  +--morey.spore.SporeAction
        |
        +--morey.spore.Type

public class Type
extends SporeAction
implements java.lang.Cloneable

Used to change the type/team/colour of the spore. This is to make things pretty.

Here is a link to the source code

See Also:
Right, Left, Claim, Flip, Spawn

Field Summary
protected static double EXECUTE
           
protected  int type
          the type/team/colour to change the spore
 
Fields inherited from class morey.spore.SporeAction
NO_COMPLEXITY
 
Constructor Summary
Type(int type)
          construct a type change...
 
Method Summary
 boolean executeAction(Spore s, Processor cpu)
          change the type of a spore
 double getExecutionTime(Spore s, Processor cpu)
          gets up the time of execution for the next action
 java.lang.String toString()
          Gives a String representation of this
 
Methods inherited from class morey.spore.SporeAction
addSpore, addSporeCommands, parseCommand, parseSpore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXECUTE

protected static final double EXECUTE

type

protected final int type
the type/team/colour to change the spore
Constructor Detail

Type

public Type(int type)
construct a type change...
Method Detail

getExecutionTime

public double getExecutionTime(Spore s,
                               Processor cpu)
gets up the time of execution for the next action
Overrides:
getExecutionTime in class SporeAction
Parameters:
s - the spore wanting to execute the action
cpu - that executes this action (and required info...)
Returns:
the time of execution

executeAction

public boolean executeAction(Spore s,
                             Processor cpu)
change the type of a spore
Overrides:
executeAction in class SporeAction
Returns:
true (can't die from changing colour)

toString

public java.lang.String toString()
Gives a String representation of this
Overrides:
toString in class java.lang.Object