Keeping track of the player's lives
This commit is contained in:
+29
-25
@@ -1,28 +1,32 @@
|
||||
"""!
|
||||
@file constants.py
|
||||
@brief Constants shared across the Hangman game.
|
||||
"""
|
||||
|
||||
## Character shown for a letter that has not been guessed yet.
|
||||
BLANK = "_"
|
||||
## Words the computer picks from.
|
||||
WORD_LIST = [
|
||||
"aardvark",
|
||||
"baboon",
|
||||
"camel",
|
||||
"dolphin",
|
||||
"elephant",
|
||||
"flamingo",
|
||||
"giraffe",
|
||||
"hedgehog",
|
||||
"iguana",
|
||||
"kangaroo",
|
||||
"leopard",
|
||||
"octopus",
|
||||
"penguin",
|
||||
"squirrel",
|
||||
"tortoise",
|
||||
]
|
||||
"""!
|
||||
@file constants.py
|
||||
@brief Constants shared across the Hangman game.
|
||||
"""
|
||||
|
||||
## Number of wrong guesses the player may make before losing.
|
||||
MAX_LIVES = 6
|
||||
## Character shown for a letter that has not been guessed yet.
|
||||
BLANK = "_"
|
||||
## Words the computer picks from.
|
||||
WORD_LIST = [
|
||||
"aardvark",
|
||||
"baboon",
|
||||
"camel",
|
||||
"dolphin",
|
||||
"elephant",
|
||||
"flamingo",
|
||||
"giraffe",
|
||||
"hedgehog",
|
||||
"iguana",
|
||||
"kangaroo",
|
||||
"leopard",
|
||||
"octopus",
|
||||
"penguin",
|
||||
"squirrel",
|
||||
"tortoise",
|
||||
]
|
||||
|
||||
## Message shown when the player wins.
|
||||
MSG_WIN = "You win!"
|
||||
## Message shown when the player loses (the word is appended).
|
||||
MSG_LOSE = "You lose. The word was: "
|
||||
|
||||
Reference in New Issue
Block a user