Your code
Set the right wall and the floor.
Console
Results
0%
Press Run to check your code
Your code has an error
Set the right wall and the floor.
Why not 100%?
Penalties: none this run
Four ifs now, one for each edge, and the ball works its way around the window at an angle. Neither axis knows about the other — each just flips its own speed when it meets its own wall.
Set the right wall and the floor.
Set the right wall and the floor.
Set the right wall and the floor.