public class Towards extends Instruction
Modifier and Type | Field and Description |
---|---|
private GrammarElement |
xCoord |
private GrammarElement |
yCoord |
gelementsToValue
Constructor and Description |
---|
Towards(GrammarElement xcor,
GrammarElement ycor)
Represents a toward instruction
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(Context c)
Evaluate this language construct in some context.
|
java.lang.String |
toString() |
private GrammarElement xCoord
private GrammarElement yCoord
public Towards(GrammarElement xcor, GrammarElement ycor)
xcor
- the turtles xcoorycor
- the turtles ycoorpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object evaluate(Context c)
GrammarElement
evaluate
in class Instruction
c
- is the Context of what we are evaluating