raatmarien / playcardswith.me

Play cards with your friends online
https://playcardswith.me
MIT License
8 stars 1 forks source link

Redact state on server #5

Open raatmarien opened 4 years ago

raatmarien commented 4 years ago

Clients shouldn't know what is on the front side of a card when it is closed.

We could work with a global redacted state and private dictionaries of id->cardvalue. Then we should refresh the id whenever a card moves between hands, table and decks.

sambeard commented 4 years ago

How do we manage/ give out unique IDs?

raatmarien commented 4 years ago

We can use the static nextUID function in library/Utils.ts I think. The UIDs will reset after every server restart, but that is fine for now I think