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
|
Constructor Summary |
Right()
construct a simple command. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
EXECUTE
protected static final double EXECUTE
COMPLEXITY
protected static final int COMPLEXITY
Right
public Right()
- construct a simple command.
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 actioncpu - 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