From d42e5a2be6cf233b08f657d7ea7da1e2b5fea42e Mon Sep 17 00:00:00 2001 From: KimChungO Date: Sun, 14 Jan 2024 03:24:34 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20userId=20=EB=B0=9B=EA=B8=B0=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/src/main/resources/static/2048.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game-server/src/main/resources/static/2048.js b/game-server/src/main/resources/static/2048.js index d18f6fc..af81875 100644 --- a/game-server/src/main/resources/static/2048.js +++ b/game-server/src/main/resources/static/2048.js @@ -11,7 +11,7 @@ var tableID = Array( Array("30", "31", "32", "33") ); var score; -var userId = ""; +var userId = null; window.addEventListener("message", function (event) { document.getElementById("receivedData").textContent = event.data; userId = event.data; @@ -267,7 +267,7 @@ function checkGameOver() { function gameover() { var finalScore = getMaxNum() + score; alert( - "[Game Over]\nMax: " + + `[Game Over]\n${userId}님의 최종 점수\nMax: ` + getMaxNum() + "\nScore: " + score +