Skip to content

Commit

Permalink
added more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
user authored and user committed Aug 17, 2022
1 parent 4e32a54 commit b6fefb5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions HangsmanGame.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#The old good Hangsman game
#The App choose a word randomly from thw wordlist.txt
#the user have by def 15 lives


import random
from os import system, name

#choosing a word
with open('wordlist.txt', 'r' , encoding = "utf8") as f:
word=random.choice(f.readlines()).rstrip()
# Init vars
found=False
lives=15
tries=0;
letters=[]


#
def clear():
# check and make call for specific operating system

Expand All @@ -21,7 +26,7 @@ def clear():
else:
_ = system('cls')

def hide(): # hide letter function -
def hide(): # hide not found yet letters function -
hidden=''
for letter in word:
if letter in letters:
Expand Down

0 comments on commit b6fefb5

Please sign in to comment.