diff --git a/src/game.pas b/src/game.pas index 2fb82ee..ca451fd 100644 --- a/src/game.pas +++ b/src/game.pas @@ -40,7 +40,7 @@ ball.x := screenWidth div 2; ball.y := screenHeight div 2; ballSpeed.x := -ballSpeedMin; - ballSpeed.y := Randomrange(-ballSpeedMin, ballSpeedMin); + repeat ballSpeed.y := Randomrange(-ballSpeedMin, ballSpeedMin) until ballSpeed.x <> 0; player := RectangleCreate(padding, Trunc(screenHeight / 2) - Trunc(barSize.y / 2), Trunc(barSize.x), Trunc(barSize.y)); end; // game code