Skip to content

Commit

Permalink
Merge pull request #109 from BeyondPong/dev-refactor#105
Browse files Browse the repository at this point in the history
Refactor: waitGame위치 수정
  • Loading branch information
mixsung authored Jun 28, 2024
2 parents 92552ef + 0020e3f commit 2da9dde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/static/js/game/remoteGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const remoteGame = {
}

async function gameEnd(data) {
console.log(data);
role = false;
removeKeyboardEvent();
if (gameMode === 'REMOTE') await postGameResult(gameMode, user);
Expand Down Expand Up @@ -97,10 +96,12 @@ export const remoteGame = {
window.location.href = '/';
}
});
} else {
waitNextGame();
}
document.getElementById('app').appendChild(buttonContainer);
const canvasRect = $canvas.getBoundingClientRect();
buttonContainer.style.top = `${canvasRect.top + canvasRect.height / 2}px`;
buttonContainer.style.top = `${canvasRect.top + canvasRect.height / 4}px`;
buttonContainer.style.left = `${canvasRect.left + canvasRect.width / 2}px`;
}

Expand Down Expand Up @@ -305,7 +306,6 @@ export const remoteGame = {
function handleEndGame(data) {
updateScore(data);
gameEnd(data);
waitNextGame();
}

function handlePaddlePosition(data) {
Expand Down

0 comments on commit 2da9dde

Please sign in to comment.