The Hangman Project
Víctor López

Description and Rules of the game

Classical "Hangman" with a country thematic.
Description
There are a few and simple rules:
- 10 maximum failures.
- The input can only be letters from A-Z and blank space (" ").
- Empty space ("") or more than one character is not allowed.
- Exception: You can also type 1, but this will stop the game.
Rules
Workflow

The workflow was the following:
- Research the rules of the game.
- Pseudocode the game structure.
- Research code of the game to see if I'm on a good path.
- First meeting with TA.
- Coding and testing.
- Second meeting with TA.
- Polish the code.
Challenges

The most notable challenge was the replacement process.
When the player inputs a letter, if that letter is part of the hidden word, I had to replace the dash with the proper letter. It was the first time that I had to replace strings from inputs.
Although I found the function enumerate, I didn't understand how to use it properly. The TA helped me out in building this part.
Learnings

Some learnings of that project might be:
- If you print(input()) some conditions, like len(), will run into an error.
- The function time.sleep can solve some aesthetic parts of the code.
- Print every time you code to see if the output is what you expected.
- While coding, create a variable that allows you to stop the loop faster.
- Indent properly on loops to avoid fail printing.
- Set more than one condition on while loops.
Possible future improvements

For the future, I might improve the following parts:
- Set the word exit for stopping the loop.
- The countries list has been written manually.
- The allowed_characters list has been written manually.
- If the player knows (or wants to try his/her luck), let it guess the word. If it's the hidden word, it wins automatically; if not, it loses.
Demo of the game

Thank you!

The Hangman Project
By Víctor López
The Hangman Project
Project-Week-1-Build-Your-Own-Game
- 117