Created
July 22, 2016 11:44
-
-
Save richardbwest/919687247c45688f7259b15dc3e5f0e1 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
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