hugosaintemarie / magic-maze

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

Always reset mouse state when button is released #58

Closed rcjsuen closed 3 years ago

rcjsuen commented 3 years ago

Currently, the game only registers the mouse button being released if it is released within the bounds of the game. This means that the game will think that the mouse button is down even when it is not if the button was released outside the game's bounds.

Instead, the game should always evaluate and update its internal state when the mouse button is released. This should prevent inconsistencies in the game's cached state of the mouse and the actual physical state of the mouse.

This addresses #47.

hugosaintemarie commented 3 years ago

Thanks @rcjsuen!