We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bed5f92 commit 64c463aCopy full SHA for 64c463a
bootcamp_content/projects/breakout/exercises/bouncy-ball/example.js
@@ -11,16 +11,16 @@ function updateBallCoordinates() {
11
ball.left += ball.velocityX
12
ball.top += ball.velocityY
13
14
- if (ball.left < 0 + ball.size / 2) {
+ if (ball.left <= 0 + ball.size / 2) {
15
ball.velocityX = 1 * ball.speed
16
}
17
- if (ball.left > 100 - ball.size / 2) {
+ if (ball.left >= 100 - ball.size / 2) {
18
ball.velocityX = -1 * ball.speed
19
20
- if (ball.top < 0 + ball.size / 2) {
+ if (ball.top <= 0 + ball.size / 2) {
21
ball.velocityY = 1 * ball.speed
22
23
- if (ball.top > 100 - ball.size / 2) {
+ if (ball.top >= 100 - ball.size / 2) {
24
ball.velocityY = -1 * ball.speed
25
26
return true
0 commit comments