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.
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.