A user can start the first round of voting. This is implemented via a button on UI but it requires a little change. Currently, players vote secretly. We should display votes in the chat.
After the first round is done, leaders should speak for themself. It the human player is among them, a dialog window should appear asking for a speech.
Then the second round should start automatically. It should also be open.
Update for the first phase [Apr 29, 2024]:
When the first phase of voting starts, UI takes all bot ids, adds some id for the human player, shuffles all of this, and starts picking ids from the list
Before everybody votes, UI sends a request to the backend to add a message to the chat history that the voting has started
For each bot id, ask the bot to vote, then post the response to the common chat (and add it to the history for all). This means that the voting is open, and each new voter can see the results of previous voters
When a human player needs to vote, a dialog appears. It asks to choose a name and to provide a reason. This is sent to the backend to be saved and posted to the chat
After everybody voted, UI calculates the leaders
The second phase should start automatically. Leaders should speak for themselves, and then everybody votes for the second time without providing reasons. The finalist is eliminated by adding information to the chat history and to the chat. The game state should be updated. Then the game night started.
Problems:
When the vote starts, this should change the game state. GAme reload should be able to continue from this state. Need to think how exactly.
Here is the plan:
Update for the first phase [Apr 29, 2024]:
The second phase should start automatically. Leaders should speak for themselves, and then everybody votes for the second time without providing reasons. The finalist is eliminated by adding information to the chat history and to the chat. The game state should be updated. Then the game night started.
Problems: