diff --git a/client/index.html b/client/index.html
index 1a21bc5..f499b89 100644
--- a/client/index.html
+++ b/client/index.html
@@ -99,8 +99,20 @@
player.x = newX;
player.y = newY;
render();
+
+ if (maze[newY][newX] === 2){
+ socket.emit("door_reached", { x: newX, y: newY});
+ }
}
});
+
+ socket.on("door_result", (result) => {
+ if (result.correct){
+ console.log("Bonne porte ! Victoire (pour cette manche).");
+ } else {
+ console.log("Mauvaise porte. Partie terminee.");
+ }
+ })