morey.spore
Class Right

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

public class Right
extends SporeAction
implements java.lang.Cloneable

rotate the spore one side to the right. The result is the spore doesn't seem to move -- only after a spawn or flip will the action of a Right be notticed. The execution time is 1.0 (an arbitrary unit that the others will be scaled against). The complexity of this SporeAction is low (and also a unit value that the others will be scaled).

Here is a link to the source code

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

Field Summary
protected static int COMPLEXITY
           
protected static double EXECUTE
           
 
Fields inherited from class morey.spore.SporeAction
NO_COMPLEXITY
 
Constructor Summary
Right()
          construct a simple command.
 
Method Summary
 boolean executeAction(Spore s, Processor cpu)
          rotates the spore one side to the right
 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

COMPLEXITY

protected static final int COMPLEXITY
Constructor Detail

Right

public Right()
construct a simple command.
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)
rotates the spore one side to the right
Overrides:
executeAction in class SporeAction
Returns:
true (can't die from rotating)

toString

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