Created
December 9, 2015 01:02
-
-
Save franksands/86cfce7ab231008e7642 to your computer and use it in GitHub Desktop.
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
hero = LivingThing("Elsa", 50, 80, "Axe"); | |
hero.health -= 10; // Elsa takes 10 points of damage | |
if (hero.health < 0) { | |
print(hero.name + ' has died!') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment