The Hangman game is a Python terminal deployed to Heroku.
This game is to guess a random word letter by letter. If the player makes too many incorrect guesses, the man is a hangman. If the player correctly guesses the word, the man survives.
Click here to see the live site.
This game is based on the hangman game:
-
The hangman will select a word related to European countries.
-
The hangman draws a line for each letter in the word.
-
The guesser will guess one letter at a time. If the letter is in the word, the hangman will fill in the blanks with the correct guesses.
-
If the letter is not in the word, the hangman will draw one body part for each incorrect guess: head, body, and leg.
-
As a user, I want to start a new game so that I can begin playing Hangman from scratch.
-
As a user, I want the hangman game to be more user-friendly.
-
As a user, I want to visit hangman game to learn more.
-
As a user, I want the option to play again after completing or lose a game that I can continue enjoying the Hangman experience.
- The game show.
- Welcome to the Hangman game!
- The player has read the game rules.
- Name request input.
- When the player enters their name, they will receive a welcome message.
- Name invalid
- Enter a Number and space is not a valid name.
- Show the instructions.
- The game starts by showing live stages and a word, and then it starts the game.
- Guess a letter.
- Players can press any letter of the alphabet on their keyboard to start the game.
- Guess correct.
- If the guessed letter is correct, a message is sent confirming its placement in the word.
- Guess incorrect.
- If the guessed letter is incorrect, players will receive a message indicating that the letter is not in the word.
- Letter and number invalid
- Two than one letter or number is not vnvalid
- Game win.
- Players win the game by correctly guessing all the letters in the word. Once they do this, they receive a message informing them that they have guessed the word and won the game.
- Game lose.
- Players lose the game when they exhaust all incorrect guesses and the full graphic is displayed. In this scenario, they receive a message stating that they have lost.
- Play again.
- If the player want to play "start_over == 'y'"
- If the player chooses not to "play start_over == 'n'"
- End game.
- If they don't want to play again, a "Thank you for play and hope you enjoyed it. BYE!" message will be displayed.
-
Implement different difficulty levels easy, medium, hard" with word lengths to cater to players of different skill levels.
-
Players to choose from different themes or categories for the words, such as animals, movies, history, or sports.
I used Canva to plan and map out the core processes.
- For all testing, please refer to the following TESTING.md file
Code Institute has provided a template to display the terminal view of this backend application in a modern web browser. This is to improve the accessibility of the project to others.
The live deployed application can be found deployed on Heroku.
This project uses Heroku, a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.
Heroku needs three additional files in order to deploy properly.
- requirements.txt
- Procfile
- runtime.txt
You can install this project's requirements (where applicable) using:
pip3 install -r requirements.txt
If you have your own packages that have been installed, then the requirements file needs updated using:
pip3 freeze --local > requirements.txt
The Procfile can be created with the following command:
echo web: node index.js > Procfile
The runtime.txt file needs to know which Python version you're using:
- type:
python3 --versionin the terminal. - in the runtime.txt file, add your Python version:
python-3.9.18
For Heroku deployment, follow these steps to connect your own GitHub repository to the newly created app:
This project can be cloned or forked in order to make a local copy on your own system.
For either method, you will need to install any applicable packages found within the requirements.txt file.
pip3 install -r requirements.txt.
If using any confidential credentials, such as CREDS.json or env.py data, these will need to be manually added to your own newly created project as well.
You can clone the repository by following these steps:
- Go to the GitHub repository
- Locate the Code button above the list of files and click it
- Select if you prefer to clone using HTTPS, SSH, or GitHub CLI and click the copy button to copy the URL to your clipboard
- Open Git Bash or Terminal
- Change the current working directory to the one where you want the cloned directory
- In your IDE Terminal, type the following command to clone my repository:
git clone https://github.com/ciarangriffin93/Hangman-game.git
- Press Enter to create your local clone.
Alternatively, if using Gitpod, you can click below to create your own workspace using this repository.
Please note that in order to directly open the project in Gitpod, you need to have the browser extension installed. A tutorial on how to do that can be found here.
By forking the GitHub Repository, we make a copy of the original repository on our GitHub account to view and/or make changes without affecting the original owner's repository. You can fork this repository by using the following steps:
- Log in to GitHub and locate the GitHub Repository
- At the top of the Repository (not top of page) just above the "Settings" Button on the menu, locate the "Fork" Button.
- Once clicked, you should now have a copy of the original repository in your own GitHub account!
-
Python: Used to provide functionality to the site.
-
Git: Used write Git to commit and push the code for the development of the website.
-
Gitpod: Cloud IDE was used to write, commit, and push code to GitHub.
-
Github: Used frequently to commit and push code.
-
Heroku: Deploy a live version of the terminal.
-
Fancy text pro: Used to create art with text.
-
Canva: Used create a flowchart for project preparation.
-
CI Python Linter: Used display warnings and errors to assess code quality.
-
Colorama: Used to add color for visual feedback.
-
Import os: Used to clear function for keeping the terminal clean.
-
Use the correct template from CI:
-
Optionally install these extensions:
-
flake8 (basic linter - validate your code in the problems tab)
-
autopep8 (basic formatter)
-
pylint (only for more advanced/complex suggestions)
-
-
Validate by copy/pasting here:
-
Documentation for validation here:
-
Youtube: This is used for learning how to create a hangman game in Python.
-
Colorama youtube: This is used to how do import Colorama into Python.
-
W3schools: This site was created using information W3Schools.
-
OS: This is how to use the OS module to clear the terminal.
-
Code Institute: This is from code institute to learn how to create love sandwiches project.
-
Git Commit: I learn how to writing better commit messages.
-
I would like to thank to my mentor, Tim Nelson and Rory Sheridan for his help and unwavering support.
-
I would like to thank to my tutor at Code Institute for their help and unwavering support.
-
I would like to thank to my family for their patience, support, and understanding.
-
I would like to Code Institute's Slack community,and Deaf group for their support.













