Skip to content

Commit

Permalink
[Fix] userId 받기 기능 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ChungO5 committed Jan 13, 2024
1 parent 7356e6a commit d42e5a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions game-server/src/main/resources/static/2048.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -267,7 +267,7 @@ function checkGameOver() {
function gameover() {
var finalScore = getMaxNum() + score;
alert(
"[Game Over]\nMax: " +
`[Game Over]\n${userId}님의 최종 점수\nMax: ` +
getMaxNum() +
"\nScore: " +
score +
Expand Down

0 comments on commit d42e5a2

Please sign in to comment.