refactored logic turtle

by Alex Reher

24 May 2017

Race against a random arrow.

Old Turtle:

New Turtle:

I really like the function for making repetitive actions a lot easier to implement. It also let me organize the code into more manageable segments. I didn’t make it as fancy as I would have liked, but the functions have made it much quicker to get results onscreen and free me up to actually design rather than spend time copy/pasting repetitive lines.

I wanted to try creating turtles within the function but was not able to get that to work. I imagine it’s possible, but I just haven’t gotten the logic right.

it's pronounced aboot! Find Alex Reher on Twitter, Github, and on the web.