Hangman - Game
Introduction
Project milestone 3 for Code Institute Full-stack development program: Python Terminal.
Hangman is a Python terminal game, which runs in the Code Institute mock terminal on Heroku. The main goal of the game is to guess letters in order to find the word that the computer randomly selects.
Frameworks - Libraries - Programs Used
- Git
- Git was used for version control by utilizing the Gitpod terminal to commit to Git and push to GitHub
- GitHub
- GitHub is used to store the project's code after being pushed from Git
- Heroku
- Heroku was used to deploy the live project
- VSCode
- VSCode was used to create and edit the website
- PEP8
- The PEP8 was used to validate all the Python code
Testing
PEP 8 Online
The PEP8 Validator Service was used to validate every Python file in the project to ensure there were no syntax errors in the project.
-
No errors or warnings were found during the testing of the code in PEP8
Functionality
-
The terminal has no issues and is working properly
-
The typewriter starts typing at the right time and is working correctly
-
The input for name and city have the right behaviour and shows the user an alert if the input is empty
-
The game rules appear without any issues after the player submits their name and city
-
The option to press any key to start a game is running well
-
The game runs without any issues and as expected
-
At the end of the game, the Leaderboard is updating correctly
-
All the menu options are working without any fails
Bugs
Python Lines too Long
Deploying this Project
- This site was deployed by completing the following steps:
- Log in to Heroku or create an account
- On the main page click the button labelled New in the top right corner and from the drop-down menu select Create New App
- You must enter a unique app name
- Next select your region
- Click on the Create App button
- The next page is the project’s Deploy Tab. Click on the Settings Tab and scroll down to Config Vars
- Click Reveal Config Vars and enter port into the Key box and 8000 into the Value box and click the Add button
- Click Reveal Config Vars again and enter CREDS into the Key box and the Google credentials into the Value box
- Next, scroll down to the Buildpack section click Add Buildpack select python and click Save Changes
- Repeat step 8 to add node.js. o Note: The Buildpacks must be in the correct order. If not click and drag them to move into the correct order
- Scroll to the top of the page and choose the Deploy tab
- Select Github as the deployment method
- Confirm you want to connect to GitHub
- Search for the repository name and click the connect button
- Scroll to the bottom of the deploy page and select the preferred deployment type
- Click either Enable Automatic Deploys for automatic deployment when you push updates to Github
Forking This Project
- Fork this project by following the steps:
- Open GitHub
- Click on the project to be forked
- Find the Fork button at the top right of the page
- Once you click the button the fork will be in your repository
Cloning This Project
- Clone this project by following the steps:
- Open GitHub
- Click on the project to be cloned
- You will be provided with three options to choose from, HTTPS, SSH, or GitHub CLI, click the clipboard icon in order to copy the URL
- Once you click the button the fork will be in your repository
- Open a new terminal
- Change the current working directory to the location that you want the cloned directory
- Type git clone and paste the URL copied in step 3
- Press Enter and the project is cloned
Credits
Content
- All the content in the game is original
- The terminal function and template for the deployable application was provided by Code Institute - Template
- The Python code for the typewriter was taken from the following tutorial: Kwasii