Hello
Could you give me some feedback on my code
The link on the task
Thank you
Congratulations, @DiYuriivna
Everything works as expected
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.
Have a nice day,
Michael