Mar-02-2019, 03:57 PM
It' the way the recursion works. Trace it through: A x = 300, it goes forward 300 and left 30. Then it calls itself with x = 225. Control now passes to x = 225, which goes forward 225 and left 30, and calls itself with x = 169. Control passes to x = 169, which goes forward 169 and left 30, and calls itself ...
Since the recursion first occurs after drawing the left fork, it's going to draw the left fork until it gets to the terminal state. This is called depth-first, as opposed to breadth-first, which is what you were expecting.
Since the recursion first occurs after drawing the left fork, it's going to draw the left fork until it gets to the terminal state. This is called depth-first, as opposed to breadth-first, which is what you were expecting.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures