morey.spore
Class Sequence
java.lang.Object
|
+--morey.spore.SporeAction
|
+--morey.spore.Sequence
- public class Sequence
- extends SporeAction
- implements java.lang.Cloneable
Sequence is not a true SporeAction -- it helps with the repeating part of the
language. For instance, "3 flip" is equivalent to "flip flip flip". But to
be more useful a sequence of actions can be repeated. For instance,
"3 { flip claim }" is equivalent to "flip claim flip claim flip claim".
So for ease, the Sequence is considered as a SporeAction.
Here
is a link to the source code
- See Also:
Repeater,
Left,
Type,
Claim,
Flip,
Spawn
|
Field Summary |
protected java.util.Stack |
sequence
the reversed sequence of SporeActions that are grouped together. |
|
Constructor Summary |
Sequence(java.util.Stack sequence)
construct a Sequence |
|
Method Summary |
double |
getExecutionTime(Spore s,
Processor cpu)
gets up the time of execution for the next action |
static java.lang.String |
stringList(java.util.Stack s,
java.lang.String space)
|
java.lang.String |
toString()
Gives a String representation of this |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
sequence
protected java.util.Stack sequence
- the reversed sequence of SporeActions that are grouped together.
- See Also:
SporeAction#parseList()
Sequence
public Sequence(java.util.Stack sequence)
- construct a Sequence
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
toString
public java.lang.String toString()
- Gives a String representation of this
- Overrides:
- toString in class java.lang.Object
stringList
public static java.lang.String stringList(java.util.Stack s,
java.lang.String space)