- Joined
- Jun 24, 2012
- Messages
- 112
I'm making a complex voting system that allows players to vote on 1 of 4 game modes and then vote on 1 of 3 options of that game mode.
The voting system first needs to select the most popular game mode, then the most popular game option regardless of game mode.
If one voting option has a greater amount of votes than all the others, it's easy to perform the necessary actions, BUT if 2 or more game modes have an equal amount of votes, I need the system to randomly select one of the more popular game modes.
The same needs to be repeated for the game options, which vary based on the game mode.
So far, I've tried doing a massive number of if/then/elses but it's not very efficient and hard to read/troubleshoot, etc.
I'm using loops but am kinda stuck on some stuff.
The voting system first needs to select the most popular game mode, then the most popular game option regardless of game mode.
If one voting option has a greater amount of votes than all the others, it's easy to perform the necessary actions, BUT if 2 or more game modes have an equal amount of votes, I need the system to randomly select one of the more popular game modes.
The same needs to be repeated for the game options, which vary based on the game mode.
So far, I've tried doing a massive number of if/then/elses but it's not very efficient and hard to read/troubleshoot, etc.
I'm using loops but am kinda stuck on some stuff.