Class and Array


collaborated with Anna Oh


Anna and I wanted to make an upgraded version of the animal DJ set we made last time. We came up with this cat and dog star wars idea. This is my initial sketch of a rough idea.


First, I created a class called animal that contains two arrays, cats and dogs. This is the first prototype we made. Each has five cats and dogs travel diagonally across the screen.

download (1).png

I learned about nested loops when I was doing dog and cat intersecting. Because each cat in the array needs to check each dog in the other array, they need two for loops to check this.