Questions about referee

Ah I see. Thanks! :smiley:

One more problem: Thereā€™s (supposed to be) a hole in the grid of boulders falling down from the sky, so that the hero can survive the meteor shower.

Why isnā€™t if ((posx-targetx)^2 + (posy-targety)^2) > (radius)^2 creating a safety circle?

Did I get the equation of a circle wrong (i donā€™t think so) or is math different in coffee script?

if (Math.pow(x - targetx, 2) + Math.pow(y - targety, 2)) > radius * radius

Also Iā€™ve refactored your code a little

1 Like