Skip to content

Instantly share code, notes, and snippets.

@benjjo
Last active December 25, 2016 18:11
Show Gist options
  • Save benjjo/3d5714ff8f7451abc3bb35bcee69cc65 to your computer and use it in GitHub Desktop.
Save benjjo/3d5714ff8f7451abc3bb35bcee69cc65 to your computer and use it in GitHub Desktop.
A random Dwarf quote generator. To help understand Python CLASS objects
#!/usr/bin/python
from random import randrange
class Axe(object):
def __init__(self):
self.start = "Schist!"
def gimli(self):
# Everyone should have a Random dwarf quote generator.
quote = [
"I'm always last, and I don't like it.",
"Faithless is he who says farewell when the road darkens.",
"They had no honor in life. They have none now in death.",
"Whatever luck you live by... let's hope it lasts the night.",
"It's true you don't see many dwarf women. And in fact, "
"they are so alike in voice and appearance, that they "
"are often mistaken for dwarf men.",
"I cannot jump the distance, you'll have to toss me.",
"And you know what this Dwarf says to that? Ishkhaqwi ai durugnul! I spit upon your grave!",
"There is some good stonework here.",
"You may do as you please in madness.",
"I have but returned to take what is mine; for I am the last of my people.",
"The new Gandalf is grumpier than the old one.",
"The Dwarves delved too greedily and too deep.",
"The air must be thin up there, elf, for ye are daft to come up with that plan",
"Never turn down an ale, who knows if it may be your last.",
"Her beard is winking at me.",
"Wherever there are elves, there are lies!",
"Nothing a hammer can't solve.",
"You can kill a dwarf, but you can never vanquish one!",
"The stones will sing if you let them.",
"Dwarven women are like axes. As dangerous from the back as from the front.",
"A mead in the hand, is worth two goblin heads in the bush.",
"Leave iron to rest before you hammer it.",
"You are softer than sandstone and drier than talc!",
"Cave toads speak little, but when they do, listen.",
"A pebble will stay dry inside, no matter how long it is submerged in a pool of water.",
"Nothing evens a race like an axe to the kneecaps.",
"The smallest pebble was once the biggest stone, the biggest stone was once bigger."]
print(quote[randrange(0, len(quote))])
class Pick(Axe):
def aglarond(self):
print("Immeasurable halls, filled with an everlasting music of")
print("water that tinkles into pools, as fair as Kheled-Zaram")
print("in the starlight.")
#dad = Axe()
son = Pick()
son.gimli()
son.aglarond()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment