A voting machine capable of deciding an election by instant runoff.
This application is primarily intended to be run as a Discord bot.
Follow Discord's instructions for adding a bot to your server.
When it's configured, execute this application from the main method in Bot.java,
passing in your bot's token
as the single runtime argument.
The application will connect to your server and register various
slash commands needed to interact with the bot.
Type /help in a channel called #bot-commands to get started.
The Discord bot initializes an election with a set of games to choose between. Tweak the source code to replace these with the candidates of your choosing. Additional candidates can be suggested after the election starts.
By default, a Weighted Runoff process is used to decide elections. Several other algorithms have been included; pass one in to the Evaluator method below to evaluate the election using an alternate algorithm.
evaluateElection(Election<V> election, Function<Race,EvalAlgorithm<V>> algorithm)
Multiple "races" are supported, to allow simultaneous election of a winner in multiple categories, similar to political elections. Currently, the Discord bot only supports elections with a single race.