Created
March 13, 2019 21:13
-
-
Save conradludgate/1ad7d11a67e7f2f20894e6144fb0babf 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
fluffy = Labrador("fluffy") | |
scruffy = GoldenRetriever("scruffy") | |
cat = Cat(fluffy) | |
cat.say() # Meow, I am a cat and my enemy says: 'Bark, I am a Labrador' | |
cat.move() # I am running away from fluffy | |
scruffy.say() # Bark, I am a Golden Retriever | |
scruffy.move() # I am chasing cats |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment