Serban8 / Triviador-ModernCpp

1 stars 0 forks source link

Modify /checkwaitingroom to allow for votes to start #56

Open Serban8 opened 1 year ago

Serban8 commented 1 year ago

We should modify the waiting room in order to count start game votes. The request sent from the client should contain a body that specifies if the client has voted to start (a field like vote=false/vote=true)

We should have a counter the counts these votes. When the number of votes is equal to the number of players in the waiting room and the number of players is greater than 2 the response sent should be to start the game.

In /startgame we also need to count the players that have joined, and only when the number is equal to those in the waiting room to start the game.