Crashing and Stopping
Today at my internship I worked on making my little person stop when he crashed into the bird. I implemented the bird in my code last week. This was pretty difficult when I started to do it, but I soon got the hang of it. First I needed to find the dimensions of my little character. Since my little guy isn't a perfect square, I had to make one. Instead of finding some complicated dimensions of this abstract guy, I just put the dimensions of a square that was very close to the height and width of the little guy. After I did this, I did the same thing with the bird. Since the bird is also an abstract shape, I found the dimensions of a square that was very close to the height and width of the bird. Now came the hard part for me. I then had to find a way to say that "if this first square (the little guy) crashes into this other square (the bird) then console.log("Crashed") + stop(). The last part of the if statement might seem confusing, but it is...