I've been creating several menus to perform specific tasks for a base management game I've been making. I've run into a few problems though, that have been hard to find a way to fix.
Firstly, I want to be able to find the percentage of a population based on a boolean instance variable. I want to determine which members of the population the boolean is set to true and turn that into a percentage that I can display for players. For instance, of the population of 20 workers, 2 of them have the plague. Therefore the game would show the player that 10% of workers have the plague.
I also want to do something similar for String Instance Variables. I want to show the players a percentage of the workers that are unemployed, which is determined by a string.
I'm also wondering if it would be better to change each individual job the workers can have into boolean values and switch them on and off much easier than parsing a string. Let me know your thoughts, and I appreciate any ideas!