Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Don't send the full match state to clients #7

@randomPoison

Description

@randomPoison

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.

Metadata

Metadata

Assignees

Labels

cheat preventionMeasure to prevent cheating and exploitsclientChanges that affect the client codebaseserverChanges that specifically affect the server codebasesharedChanges that affect the shared codebase

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions