Merge pull request #655 from NeroBurner/paddle_hor_fix

Paddle: compare ballX coordinate with horizontal resolution
This commit is contained in:
JF 2021-10-16 14:09:05 +02:00 committed by GitHub
commit fafb998b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,8 +47,8 @@ void Paddle::Refresh() {
dy *= -1; dy *= -1;
} }
// checks if it has touched the side (left side) // checks if it has touched the side (right side)
if (ballX >= LV_VER_RES - ballSize - 1) { if (ballX >= LV_HOR_RES - ballSize - 1) {
dx *= -1; dx *= -1;
} }