Created
December 28, 2015 05:40
-
-
Save dstoza/03add6d00cf943866bcb 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
class Creature: | |
def __init__(self, name, hp): | |
self.name = name | |
self.hp = hp | |
class Monster(Creature): | |
def __init__(self, name, hp, intelligence=10): | |
Creature.__init__(self, name, hp) | |
self.intelligence = intelligence | |
kobold = Monster('Kobold', 10, intelligence=6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment