public class Forward extends Instruction
Modifier and Type | Field and Description |
---|---|
private GrammarElement |
steps |
gelementsToValue
Constructor and Description |
---|
Forward(GrammarElement s)
Represents a forward command
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(Context c)
Evaluate the expression and move turtle forward.
|
java.lang.String |
toString() |
private GrammarElement steps
public Forward(GrammarElement s)
s
- public java.lang.Object evaluate(Context c)
evaluate
in class Instruction
c
- is the Context in which the evaluation occurspublic java.lang.String toString()
toString
in class java.lang.Object