From 4ce15fd970356162aebc8f2774c71e7d99183609 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Fri, 8 Mar 2019 12:24:08 +0100
Subject: [PATCH] 'update'

---
 client/src/views/Game.vue | 6 ++++++
 server/sockets.js         | 4 ----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index e9cf8d4b..f467b3b7 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -1,4 +1,10 @@
 <!-- TODO: component Game, + handle players + observers connect/disconnect
   event = "gameconnect" ...etc
   connect/disconnect with sid+name (ID not required); name slightly redundant but easier
+
+quand on arrive dans la partie, on poll les sids pour savoir qui est en ligne (ping)
+(éventuel échange lastate avec les connectés, pong ...etc)
+ensuite quand qqun se deco il suffit d'écouter "disconnect"
+pareil quand quelqu'un reco.
+(c'est assez rudimentaire et écoute trop de messages, mais dans un premier temps...)
 -->
diff --git a/server/sockets.js b/server/sockets.js
index f3d1928d..e94f623f 100644
--- a/server/sockets.js
+++ b/server/sockets.js
@@ -107,13 +107,9 @@ module.exports = function(wss) {
           obj.oppid = sid; //I'm the opponent of my opponent(s)
           clients[oppId].send(JSON.stringify(obj));
           break;
-        // TODO: moreover, here, game info should be sent (through challenge; not stored here)
-        // TODO: also other challenge events
         case "resign":
           clients[obj.target].send(JSON.stringify({code:"resign"}));
           break;
-        // TODO: case "challenge" (get ID) --> send to all, "acceptchallenge" (with ID) --> send to all, "cancelchallenge" --> send to all
-        // also, "sendgame" (give current game info, if any) --> to new connections, "sendchallenges" (same for challenges) --> to new connections
       }
     });
     socket.on("close", () => {
-- 
2.44.0