Assessment wanted for bouncing balls features

Hello :wave:
Could you give me some feedback on my code
The link on the task

Thank you :slightly_smiling_face:

Congratulations, @DiYuriivna

Everything works as expected :+1:

Here are some remarks:

  • The exists prop would be better suited in the Ball class since the EvilCircle class (which extends Shape doesnโ€™t need it. The prop should also be updated when colliding with the evil circle.

  • To get a bit more consistency in checkBounds() you could use this code for the first and third calculation:

    /* first */
    this.x -= this.size;
    
    /* third */
    this.y -= this.size;
    
  • keyCode is deprecated. Itโ€™s better to use KeyboardEvent.code.

As you see, just small things that donโ€™t prevent correct functionality. :slightly_smiling_face:

Have a nice day,
Michael