Thanks so much for responding, and sorry for the lack of information.
I’m using the java version of processing, and I’ve never worked with objects or classes before, so I’m not sure how to use them.
The game I’m trying to make is essentially the example, but using characters from other media, and with fewer traits. The traits I’m trying to use are also all much more similar to the type trait from the example - either matching or not, not worrying about higher or lower values, since that seemed like it would be more complicated.