When the front-end connects to the back-end, it creates a callback that
sends a disconnect message with the received ID on "pagehide" and
"beforeunload" events. The previous implementation did not "undo" these
callbacks when the game was reset and a new ID was received. This fix
prevents the front-end from resending disconnect messages with
previously received IDs on browser window/tab close.
Sometimes the player would not disconnect from the Network Multiplayer
session on the back-end. Seems to work on PC browsers, not so well with
moblie browsers. This commit hopefully fixes this for mobile browsers.
"rand" crate was not compilable for wasm-unknown-unknown target, so an
alternative "oorandom" crate was substituted in.
Basic game win/draw detection logic added.
Can place tokens, and not place tokens where there already is a token.
Additional info text box added to the side of the board.
More information to the UI regarding placed tokens.
More work was needed to have separate components of the front-end to
communicate with each other. Also added an output-text-box for
informative messages.