You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit annoying to do, because the event listeners for the nodes currently are registered with an anonymous function binding back to the player. Resetting that listener appears to be impossible in HTML/JS.
The best way to do this appears to be to set up the listener functions based on the index into the sorted players table.
Doing this nicely requires an MVC refactor, which is looking useful anyway. E.g. if the model were separate from the UI structures, it could be more easily serialized/deserialized using JSON support.-
It may also be easier to plug in a second storage back-end. Currently it just supports local-storage, which is probably a good default, but it ties the team to a single device.
I just thought of a simpler way to do it: bind a player-index into the listener events and use an array of player names. The array of strings can be re-arranged, but the indexes and listeners don't need to change.
No description provided.
The text was updated successfully, but these errors were encountered: