Does your game oppress minorities? You are making games, right?
(media.scored.co)
You're viewing a single comment thread. View all comments, or full comment thread.
Comments (26)
sorted by:
"public boolean isMale;" is more efficient and does the same thing, since it is just a binary value.
isFemale is even better. You can rely on the initial value for the default case (depending on language).
Hooray for baby languages that have default initialization for everything, even if you're going to immediately overwrite it.
WRT to the screenshot though, I'd allow for one more enum value: "Freak" -- making a bool unsuitable.
I would encode it something like {invalid, male, female}.
Also a good option.