Skip to content

Commit

Permalink
Reduce the speedup of the ball as the game progresses
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldotwav committed Mar 20, 2024
1 parent d804646 commit d805f86
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ function setPaddlePosition(horizontalPosition, verticalPosition) {
function setPaddleWidth(newWidth) { paddle.width = newWidth; }
function getOriginalPaddleWidth() { return ORIGINAL_PADDLE_WIDTH; }


function setBallPosition(horizontalPosition, verticalPosition) {
ball.x = horizontalPosition;
ball.y = verticalPosition;
Expand Down Expand Up @@ -211,7 +210,7 @@ function updateScore() {
}

function updateBallSpeed() {
const speedIncreaseFactor = 1.5;
const speedIncreaseFactor = 1.4;
ball.speed *= speedIncreaseFactor;

// Update the ball's velocity components based on the new speed
Expand Down

0 comments on commit d805f86

Please sign in to comment.