hugosaintemarie / magic-maze

Online version of board game "Magic Maze"
https://magicmaze.herokuapp.com
MIT License
20 stars 11 forks source link

[dev] Reconnecting problems #21

Closed sampie777 closed 3 years ago

sampie777 commented 3 years ago

As requested, a PR based on dev branch and for dev branch. PR for master branch is/was #18.

Warning: due to bugs in the rendering of newly placed tiles, it's hard for me to test this PR. For what I can see, the changes are working: player can reconnect, tile updates are processed but just not visually shown. The player can still move hero's on that tile, so the client knows the new tile is there. It's just the rendering. But this was already a bug on the dev branch, I see.


In addition to the previous PR, this PR is focused on fixing reconnecting problems. In short, after a player reconnects (may be due to internet delays (this was my main aim, but couldn't test it so far) or refreshing the web page), he/she can continue playing the game. Also, I squeezed another game rule in this PR: pausing the game when the clock inverts: 2aae7e4.

Features:

Fixes:

Also, sorry about the auto reformatting..