fix: correction d'erreur dans le choix de bonne sortie
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user