Hi @Jared_Cave!
This is a really difficult assessment, and looking at your code, you are definitely getting there.
The first thing I did was to comment out the line firstCircle.setControls();
, as the console was complaining that setControls
is not a function. So there must be something wrong with your EvilCircle
constructor.
You should also move the creation of the EvilCircle instance out of the loop - you don’t want one EvilCircle for every ball created.
Also, I’m sorry to see that your balls have shrunk. I was going to suggest some ointment, but instead I investigated your code. if you run balls[0].size
, it returns true
, whereas it should return a number. I wonder how that has happened?
Have another look, and see if you can figure this out. Also, feel free to have a peep at our version, if you want to get some more clues: https://github.com/mdn/learning-area/blob/master/javascript/oojs/assessment/main.js