- Score 10 points
- Reflect the ball with a strip
- When the ball collides, the strip decreases
if
(
ballY + ball.clientHeight > paddle.offsetTop &&
ballX + ball.clientWidth > paddleX &&
ballX < paddleX + paddle.clientWidth
) {
ballSpeedY = -ballSpeedY;
score++;
scoreDisplay.textContent = score;
// Уменьшаем ширину полоски при ударе мячика
paddleWidth = Math.max(paddleWidth - 7, 7);
paddle.style.width = paddleWidth + "px";
}
