-
Notifications
You must be signed in to change notification settings - Fork 1
Don't send the full match state to clients #7
Description
Right now the client code knows all tiles in the wall from the start of the match, including the order in which they will be drawn. This means that a cheating client could predict which tiles are coming up and determine which tiles are in every player's hand (though at this point we're also sending every player's full hand to the clients, woops).
For multiplayer matches we should not send the full game state to the client. Currently we're using MatchState in the client which represents the full game state. Instead we'll want to lean more heavily on the Hand type, which only represents the state for a single player's hand. For the local player the client will track their full hand state, but for the other players the client will only have the list of discards.
For offline games, the client isn't connected to the server and will still need to use MatchState directly.