Created
July 26, 2017 07:57
-
-
Save tawanda-profuse/2886ae1f1962d5e749d8123fd21d017d to your computer and use it in GitHub Desktop.
The solution for the code combat game level called "Backwoods standoff"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loop { | |
hero.shield(); | |
if (hero.isReady ("cleave")) { | |
hero.findNearestEnemy(); | |
hero.cleave(enemy); | |
} | |
else { | |
var enemy = hero.findNearestEnemy(); | |
hero.attack(enemy); | |
hero.attack(enemy); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment