fix: correction d'erreur dans le choix de bonne sortie

This commit is contained in:
2026-08-03 00:21:31 +02:00
parent 4d57dfa233
commit c4370815f2
9 changed files with 14 additions and 12 deletions

View File

@@ -24,12 +24,12 @@ function handleDoorReached(wSS, socket, position) {
const result = { correct: false };
socket.emit("door_result", result);
if (partnerSocket) partnerSocket.emit("door_result", result);
result;
return;
}
pairState.doorsPassed++;
if (pairState.doorPassed >= DOORS_TO_WIN) {
if (pairState.doorsPassed >= DOORS_TO_WIN) {
pairState.gameOver = true;
socket.emit("victory");
if (partnerSocket) partnerSocket.emit("victory");