From fb7739f968d6125d12b44e2660aa0ac02285e301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Thu, 12 Feb 2015 08:39:24 +0100 Subject: [PATCH] Bug wasn't fixed, now it is --- src/PythagorasTree.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PythagorasTree.java b/src/PythagorasTree.java index 8aff836..5efa591 100644 --- a/src/PythagorasTree.java +++ b/src/PythagorasTree.java @@ -31,7 +31,7 @@ public class PythagorasTree { if (queue.size() == 0) return false; PythagorasTree tree = queue.remove(); - if (tree.momentaryDepth>= tree.maximalDepth) return true; + if (tree.momentaryDepth > tree.maximalDepth) return true; tree.turtle.getFrame().setTitle("Pythagoras Tree - Depth: " + tree.momentaryDepth + " - Target Depth: " + tree.maximalDepth + " - Queuesize: " + queue.size()); @@ -39,6 +39,8 @@ public class PythagorasTree { tree.turtleState.returnToState(tree.turtle); DrawingTools.drawSquare(tree.turtle, tree.size); + if (tree.momentaryDepth >= tree.maximalDepth) return true; + tree.turtle.forward(tree.size); tree.turtle.pushState();