pythagoreantree/src/TurtleState.java
Jan Christian Grünhage f73687b6d6 Changes to PythagorasTree implementation, still not working
Changes to the implementation, is still not workin
2015-02-10 18:13:13 +01:00

23 lines
451 B
Java

import ch.aplu.turtle.Turtle;
/**
* Created by Christian on 10.02.2015.
*/
public class TurtleState {
private double x;
private double y;
private double heading;
public TurtleState(Turtle turtle) {
x = turtle.getX();
y = turtle.getY();
heading = turtle.heading();
}
public void returnToState(Turtle turtle) {
turtle.setX(x);
turtle.setY(y);
turtle.heading(heading);
}
}