From c141fb1138ec0dd081b77caeaa6cd01d4599145f Mon Sep 17 00:00:00 2001 From: byeong Date: Thu, 5 Dec 2024 21:03:31 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20=EC=A0=95=EB=8B=B5=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/server/src/module/game/games/game.gateway.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/module/game/games/game.gateway.ts b/packages/server/src/module/game/games/game.gateway.ts index 6bd3d37..569cb89 100644 --- a/packages/server/src/module/game/games/game.gateway.ts +++ b/packages/server/src/module/game/games/game.gateway.ts @@ -526,9 +526,12 @@ export class GameGateway implements OnGatewayConnection, OnGatewayDisconnect { matchingAnswer(selectedAnswer: Number[], currentChoicesData) { const correctAnswers = currentChoicesData - .map((choice, index) => (choice.isCorrect ? index : null)) + .map((choice) => (choice.isCorrect ? choice.position : null)) .filter((index) => index !== null); + console.log('correctAnswers : ', correctAnswers); + console.log('selectedAnswer : ', selectedAnswer); + const equals = (a: Number[], b: Number[]) => a.length === b.length && a.every((v, i) => v === b[i]);