Need help on Long-Range Division in the Forest.
It’s one where there are two rows of mines and you’re supposed to shout out ranges for a cannon to hit the mines.
I can’t figure out how to calculate the range to enemy using division. I understand the syntax is 4 / 2 == 2, but I can’t seem to do distanceToEnemy / 3 == …
Here’s the bare code of the episode:
Destroy the mines!
Use say to call out the range to the mines.
Use division to calculate the range.
enemy = hero.findNearestEnemy()
distanceToEnemy = hero.distanceTo(enemy)
Say first Range: distanceToEnemy divided by 3
hero.say(“Fire!”)
Say second range: distanceToEnemy divided by 1.5
hero.say(“Fire!”)
Say these things for motivation. Really. Trust us.
hero.say(“Woo hoo!”)
hero.say(“Here we go!”)
hero.say(“Charge!!”)