Assessment wanted for - Adding bouncing balls features

Hello, could someone please assess this?

Link to task: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Adding_bouncing_balls_features#steps_to_complete

Link to my code: https://jsfiddle.net/Keyboardguy/rL76tuqf/5/

Hello @Keyboardguy

you doing great well done and nice use of js classes

but not sure what you mean by this line

if (!(this === ball) && ball.exists) in the collisionDetect method
i mean what !(this===ball) should do ?

Edit : the previous one come from the lesson to ignore the check of ball collide with itself my mistake sorry for that
it would be better if you check the position of the ball if it get outside the boundary of the canvas before move it try to move the white ball to the edge and keep pressing the key and you notice it get outside the boundary

hope that help and have a nice day :slight_smile:

1 Like

Hello,

Thanks for the feedback! As for the evil ball moving outside the canvas area, I thought it was okay to let it outside the canvas for a frame since in the finished example (https://mdn.github.io/learning-area/javascript/oojs/assessment/), the evil ball also goes out the canvas for a frame.

But it definitely looks better without the ball going out the boundary!

Thanks, Keyboardguy

2 Likes

you very welcome and you are right :slight_smile: