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