Hangman is a game meant to be something to pass time with, guessing letters of a word without getting the man hung.
If you guess the word correct, you win.
If you run out of guesses and haven't gotten the correct word - you lose and the game displays a hanging man.
It's a Python terminal game, which runs on Heroku.
The target for this game is someone that needs a few minutes break to pass time.
- Player gets displayed a view of the game, and gets information to choose a letter.
- Player gets information if the guess is correct or false
- The player is displayed with a presentation of previous guesses
- The player will have a display with lines, and correct words printed.
- The player will see the previous guess if its wrong.
- For every wrong guess there's one more attachment for the hanging man.
- After 6 guesses if word is not guessed, the player will be displayed with the correct word.
- The player will be displayed with a choise to either play a new game or finish the game.
- If the player writes yes, or y the game starts over.
- If the player writes no the game ends.
https://hangmanjf.herokuapp.com/
-
You first get a welcome message, saying let's play!
-
If you try guessing anything but a letter, you get asked to enter a valid option, and the suggestions of the letters valid,
-
If you guess the wrong letter you get displayed the amount of guesses you have left, it also displays amount of correct guesses which here shows as 0.
-
If you guess the correct word, the letter is displayed on the line for the word, and correct guesses starts counting with 1.
Pep8 - I tested my Python code here for validation, displayed no errors.
.
-
I started with creating a Config Var called
PORT
, and set this to8000
in my Heroku page. -
I created the app using following steps:
-
I added two buildpacks from the Settings tab. The ordering is as follows:
heroku/python
heroku/nodejs
- The importance here is to first have the Python, and after it the nodejs for it to work properly.
- This project was made using only Python.
- Code is written in gitpod.
- This project has been deployed to Heroku.
- Due to loosing a week i decided to skip some features because of lack of time.
(I got notification of extension only a day before deadline when my game was already completed). - I would have added a step before game start to enter user name.
- I would have added a nicer way to display how to not guess numbers, symbols or empty space.
- I would have added a cleaner way to display previous guesses.
- I had an error with getting the user to not be able to guess empty letters, numbers or symbols. I fixed this by adding the def ask input.
- I had issues with the indetation which was giving me errors in PEP8. I fixed that by going over my code and sorting out indentations
Kite on Youtube - Kite's youtube channel, and the video of inspiration here.
Shaun on YouTube - Shauns youtube channel, and the video of inspiration here.
Symbols - I got the symbols for hangman from here.
- This is a game for Project 3 for the Full Stack Software Developer program with Code Institute.