This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
Don't send the full match state to clients #7
Labels
cheat prevention
Measure to prevent cheating and exploits
client
Changes that affect the client codebase
server
Changes that specifically affect the server codebase
shared
Changes that affect the shared codebase
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 theHand
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.The text was updated successfully, but these errors were encountered: