Brian's Turtle Hack

by Brian Pugsley

22 May 2017

Here is my turtle hack:

I really had fun with this. I took a lot of different directions, at times. and ended up settling with this one. One thing I tried, initially, was to make the basketball controllable. I was able to do that but I wanted to be able to perform an action if the basketball reached a certain point (the goal) but couldn’t really figure that out. So, I made the basketball go in an arc. As soon as I started thinking about the x and y axes, I realized that I could just make the turtle move and turn a certain number of times, over a certain range, to make the ball go in an arc. I’m sure we will cover that later in the semester. I had some issues, early on making sure the turtle showed up where I wanted it. There were times when the ball would randomly start in a different position or the crying face would not cover MJ’s face but I think I solved that by making sure the turtle started at (0,0). I was glad I was able to use the for statement to alternate the color of the Ceiling statement instead of having to create individual statements for each word and coordinate moving teach one. It made it a lot easier. It was really helpful, in this program, to use the comments because it helped me in my iterative process. One thing I found very valuable was commenting out particular parts of the code. This helped me to find my errors and fix my code.

A frustrating part is that the placement of the turtle changed when I embedded it to GitHub. I changed the iFrame size to the 400px but it still makes the turtle show go to different locations than prescribed in the code. This makes it difficult, especially when trying to be very precise.

Never half-ass two things. Whole-ass one thing -Ron Swanson Find Brian Pugsley on Twitter, Github, and on the web.