Created
March 17, 2014 23:29
-
-
Save kadamwhite/9610527 to your computer and use it in GitHub Desktop.
iterative code to make a March Madness-style bracket, runnable at http://www.calormen.com/jslogo/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TO mmadness :depth | |
if :depth < 1 [forward 10 back 10 stop] | |
forward :depth * 10 * 2 | |
right 90 | |
forward :depth * ( 10 * ( :depth / 5 ) ) | |
left 90 | |
mmadness :depth - 1 | |
right 90 | |
back :depth * ( 10 * ( :depth / 5 ) ) | |
left 180 | |
forward :depth * ( 10 * ( :depth / 5 ) ) | |
right 90 | |
mmadness :depth - 1 | |
left 90 | |
back :depth * ( 10 * ( :depth / 5 ) ) | |
right 90 | |
back :depth * 10 * 2 | |
END | |
clearscreen | |
right 90 | |
mmadness 5 | |
left 180 | |
mmadness 5 | |
right 90 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment