diff --git a/README.md b/README.md index 34cec59e4c070bdac03995801db6bd82d8bc6389..1c8d1f8b871e064d9c6ab0074a7ff0fc644df3e4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Connect4 -By Ulysse DURAND +By Ulysse DURAND and Oumaima Laklouch ## Cahier des charges diff --git a/halloffame.json b/halloffame.json index 1619b1e2e868703aac0a3bff6b4e8b070663e301..18a2c65db170ff6184d24cb292c89ca00aca22a3 100644 --- a/halloffame.json +++ b/halloffame.json @@ -1 +1 @@ -{"test2":1,"aaa":1,"bbb":2,"fff":1} \ No newline at end of file +{"test2":1,"aaa":2,"bbb":4,"fff":1,"ulysse":1,"testA":1} \ No newline at end of file diff --git a/public/index.html b/public/index.html index d98b75e5bc71453b96a5381056c9648e6837c012..20b373f559f2a32024efbba4e3430c2812cba8fa 100644 --- a/public/index.html +++ b/public/index.html @@ -156,6 +156,7 @@ h1 { }); socket.on('updateHOF', (hof) => { + console.log("coucou"); const hofList = document.getElementById('hof-list'); hofList.innerHTML = Object.entries(hof) .sort((a, b) => b[1] - a[1]) diff --git a/rapport.pdf b/rapport.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ec2c334d2b9fd6816fca7cb155af66d39f068c67 Binary files /dev/null and b/rapport.pdf differ diff --git a/server.js b/server.js index bd9fcc88495bb953875ea891c33f8b68dc48806d..8069f471a8a0b16a774f17744c236aa62ae2bfc0 100644 --- a/server.js +++ b/server.js @@ -44,6 +44,7 @@ io.on('connection', (socket) => { socket.on('askRooms', () => { io.emit('updateRooms', rooms); + io.emit('updateHOF', hallOfFame); }); let stopGame = (room, roomId) => { @@ -96,7 +97,6 @@ io.on('connection', (socket) => { socket.join(roomId); io.emit('updateRooms', rooms); - io.to(roomId).emit('updatePlayers', room.players); if (room.players.length === 2) { startGame(room, roomId); } diff --git a/test b/test deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000