cs10 / bjc-r

The Beauty and Joy of Computing public resource repository.
https://beautyjoy.github.io/bjc-r
30 stars 98 forks source link

Bug in Crazy Trees Page #859

Open cycomachead opened 2 years ago

cycomachead commented 2 years ago

https://cs10.org/bjc-r/cur/programming/recur/tree/random-tree.html?topic=berkeley_bjc%2Frecur%2Frecursion-trees-fractals.topic&course=cs10_fa20.html&novideo&noreading&noassignment

code (and project linked) has levels FIRST and size SECOND, but in recursive call they're switched. I'm sure that's not intended, since the whole exercise is about making sure they can draw a tree with random left and right angles (obv the solution is to remember those in script vars, and re-use them in the turns below) NOT "hey, did you also notice a common error that we switched the arguments?"...