morey.spore
Class Repeater
java.lang.Object
|
+--morey.spore.SporeAction
|
+--morey.spore.Repeater
- public class Repeater
- extends SporeAction
- implements java.lang.Cloneable
Repeater is not a true SporeAction -- it is a short form.
For instance, "3 flip" is short for "flip flip flip". As well,
sequence of actions can be repeated. For instance,
"3 { flip claim }" is short for "flip claim flip claim flip claim".
Here
is a link to the source code
- See Also:
Sequence,
Left,
Type,
Claim,
Flip,
Spawn
|
Field Summary |
protected int |
repetitions
the number of times to repeat the next SporeAction |
|
Constructor Summary |
Repeater(int repetitions)
construct a repeater |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
repetitions
protected final int repetitions
- the number of times to repeat the next SporeAction
Repeater
public Repeater(int repetitions)
- construct a repeater
getExecutionTime
public double getExecutionTime(Spore s,
Processor cpu)
- gets up the time of execution for the next action.
This method will be simplified when I tweak the parser.
- 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