pythagoreantree/src/PythagorasTreeQueue.java
Jan Christian Grünhage 66a52a118e complete recreation of the method drawing the pythagoras Tree.
Still has some bugs, and it won't work recursively for large trees, so it is in a while loop.
2015-02-11 11:41:10 +01:00

19 lines
605 B
Java

import ch.aplu.turtle.Turtle;
import java.util.LinkedList;
/**
* Created by Christian on 10.02.2015.
*/
public class PythagorasTreeQueue extends LinkedList<PythagorasTree> {
public PythagorasTreeQueue(PythagorasTree.PythagorasTreeVariant variant, PythagorasTriangleList triangles, Turtle turtle, double size, int momentaryDepth, int maximalDepth) {
super();
add(new PythagorasTree(variant, triangles, turtle, size, momentaryDepth, maximalDepth));
boolean running = true;
while (running) {
running = PythagorasTree.drawNextTree(this);
}
}
}