This project is done as a part of Cod(h)er program by Tinkerhub foundation
- Created different text files with differnt words in it
- In game.py
- Import random, time, curses
- In start():
- Depending on the selection of the option, different files are read and a random word is generated
- In call_again():
- Depending on the choice of y/n the loop is executed
- In game():
- Letter is taken as an input
- In a loop, check if the letter is in the word
- if so then find the postion of atht letter in the word
- Replace that postion in the word with "_"
- Replace show with the position with atht letter
- Check if the letter is already accepted
- Check if the entered is a an alphabet using isalpha()
- Check if the word is completed or not
- If wrong, hangman's different parts are displayed based on the count
- Can the word generated without using files?
Yes, word can be generated from a list