Week 3 assignment, classes, objects, and arrays

Hi, ya’ll,

This week, I really wanted to make something cheerful. So I made a Happiness Swirl. Click on any of the items to the right to set your stamp, then click on the picture to stamp that image as many times as you like. You can have any combination of stamps. When you’re done, hit “s” on your keyboard, the stamps will swirl around, and a happy surprise will be revealed.

This is beyond silly, but I do feel more comfortable with objects and arrays than I did before. I wanted to figure out how to add items to an array, in this case, on a mouse-click. I went back and forth a number of times between mousePressed() and mouseClicked(), but finally found this incredibly helpful example from Shiffman, and got a working version. As always, the project started with really unattractive, semi-functional sketches:
Screenshot of early version of sketch