Creation of Game,addSpectatorUpdate on the backend which appends to Game.spectatorMsgs and sends the update to all of Game.spectators.
Creation of Game.addSpectator which takes a melody Session, sends a BulkSpectatorUpdate with the content of Game.spectatorMsgs, and adds the session to Game.spectators.
Handling of SpectatorUpdate and BulkSpectatorUpdate on the frontend.
Rendering of spectator events on the frontend. This can probably just be a fixed-width log box.
This would require a few steps:
Game,addSpectatorUpdate
on the backend which appends toGame.spectatorMsgs
and sends the update to all ofGame.spectators
.Game.addSpectator
which takes a melody Session, sends aBulkSpectatorUpdate
with the content ofGame.spectatorMsgs
, and adds the session toGame.spectators
.SpectatorUpdate
andBulkSpectatorUpdate
on the frontend.