- // TODO: how to know who is observing ? Send message to everyone with game ID ?
- // and then just listen to (dis)connect events
- // server always send "connect on " + URL ; then add to observers if game...
- // detect multiple tabs connected (when connect ask server if my SID is already in use)
-// router when access a game page tell to server I joined + game ID (no need rid)
-// and ask server for current joined (= observers)
-// when send to chat (or a move), reach only this group (send gid along)
- // --> doivent être enregistrés comme observers au niveau du serveur...
- // non: poll users + events startObserving / stopObserving
- // (à faire au niveau du routeur ?)
-
- // TODO: also handle "draw accepted" (use opponents array?)
- // --> must give this info also when sending lastState...
- // and, if all players agree then OK draw (end game ...etc)