diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2021-01-09 19:58:05 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2021-01-09 19:58:05 +0100 |
| commit | ced85356edb4208a2a85d71720c4a2cc91a776d9 (patch) | |
| tree | c2e05fcfa4ab05cc010d8f7c4ec7855dfdb0ada4 /README.md | |
| parent | 5e8a8c34144a3ac9b0477e043bd5ebf1b37c5bb3 (diff) | |
| download | cyberschuessel-ced85356edb4208a2a85d71720c4a2cc91a776d9.tar.gz cyberschuessel-ced85356edb4208a2a85d71720c4a2cc91a776d9.zip | |
store last drawn word in the browsers local storage to support reconnects
Before this change last_word was only a javascript variable resetted
on a reload. This means if a player's connection dropped during their
turn and they reconnect their browser doesn't no that they
actually have already drawn a word and thus will not count it as guessed.
Now the last drawn word is stored in the browser's local storage and is
persistent during reloads.
This fixes the reconnect during once turn but allows a wrong situation:
Player A draws stores the word and it connection drops.
Player B draws some other words.
Player A reconnects missing the events and draws a actuall new card but
they restored their stored previously drawn word send it to the server and
it will be counted as guessed.
Fix this by storing an event count for the schuessel and only restore
last_word if no actions occurred during the reconnect.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions
