Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
EhabElasam committed Apr 25, 2024
1 parent bdb61b7 commit ad53ecb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions srcs/frontend/js/pongehab.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,22 @@ function showPongEhab() {
let player = await translateKey("player");
if (ball.x - ball.radius < 0) {
player2.score++;
// if (player2.score === 7) {
// gameOver = true;
// showGameOverModal(player+" 2");
// } else {
// resetBall();
// }
resetBall();
} else if (ball.x + ball.radius > canvas.width) {
player1.score++;
// if (player1.score === 7) {
// gameOver = true;
// showGameOverModal(player+" 1");
// disableControls();
// } else {
// resetBall();
// }
resetBall();
}

Expand Down

0 comments on commit ad53ecb

Please sign in to comment.