Skip to content
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

Open
randomPoison opened this issue May 24, 2020 · 0 comments
Open

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

randomPoison opened this issue May 24, 2020 · 0 comments
Assignees
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

Comments

@randomPoison
Copy link
Owner

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.

@randomPoison randomPoison added enhancement 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 and removed enhancement labels May 24, 2020
@randomPoison randomPoison self-assigned this Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

1 participant