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;
}
// checks if it has touched the side (left side)
if (ballX >= LV_VER_RES - ballSize - 1) {
// checks if it has touched the side (right side)
if (ballX >= LV_HOR_RES - ballSize - 1) {
dx *= -1;
}