Request new game with 'wrong' number of players
Situation
Suppose that you have implemented a Server without lobbies. Both client A and B have successfully sent an ANNOUNCE
message. Afterwards, client A sends REQUESTGAME|4
, wanting to play with four players. What should happen if client B then sends a REQUESTGAME|2
message?
When the Server supports lobbies, I suppose this should start a second game on the server, after which both Client A and Client B will be waiting for more players, each in their own game.
Proposed Solution
I would suggest creating a new error, which would thus be E010
, indicating that there already exists a game queue, but for a different number of players. When this error is received by the client, it could print an error message to the UI, after which the client can try resending a REQUESTQUEUE
message with a different number of players. I could also adjust the protocol slightly so that this error includes a second argument, indicating the number of players for the already existing queue, as shown in the sequence diagram.
Alternative Solution
Another option is to create a second queue, as desribed under 'Situation'. However, this does mean that all servers should support hosting multiple games at a time. This does not mean that they have to support lobbies, since players are still assigned to a game by the server, but it does require some extra functionality for all servers, namely the extra feature 'Multi-game server' of the project manual. Because I think it is not reasonable nor desirable to ask this of everyone, I am not a fan of this solution.
Conclusion
Please let me know which option you think is best, or suggest any alternatives when you think of them. Since the project is due relatively soon, I would like to close this issue within 24h (14:00, 26-01-2022).