Skip to content

Instantly share code, notes, and snippets.

@richardbwest
Created July 22, 2016 11:44
Show Gist options
  • Save richardbwest/919687247c45688f7259b15dc3e5f0e1 to your computer and use it in GitHub Desktop.
Save richardbwest/919687247c45688f7259b15dc3e5f0e1 to your computer and use it in GitHub Desktop.
import os
#Global variables and lists to be used throughout my program.
wordsList = ["dog","cat","mouse","hyena"]
usedWords = []
lives = 6
stickmen = [
"\
|------\n\
| O\n\
| ---|---\n\
| / \\ \n\
| / \\ \n\
|_____",
"\
|------\n\
| O \n\
| ---|---\n\
|\n\
|\n\
|_____",
"\
|------\n\
| O\n\
|\n\
|\n\
|\n\
|_____",
"\
|------\n\
|\n\
|\n\
|\n\
|\n\
|_____",
"\
|\n\
|\n\
|\n\
|\n\
|_____",
"\n\n\n\n______",
"\n\n\n\n\n",
]
def mainScreen():
os.system('clear')
print("Welcome to the Hangman game\n\n")
drawStickMan() # Draw the stick man
print("\n\n")
drawTheWord()
print("\n\n")
showUsedLetters()
print("\n\n")
getALetter()
def drawStickMan():
print(stickmen[lives])
def drawTheWord():
print("I'm the word with blanks")
def showUsedLetters():
print("Looking I'm drawing the used letters")
def getALetter():
print("Look, I'm getting a letter from the user")
mainScreen()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment