Giter Club home page Giter Club logo

ci_pp3's Introduction

Hangman

Hangman is a letter based guessing game where the player has a limited number of tries to guess a word by choosing a single letter at a time. If the player guesses a correct letter then they continue being allowed to guess further letters. If they guess an incorrect letter their number of attempts is decreased. The object of the game is to guess all the letters contained in a word to spell the entire name without losing all of your lives.

Webpage responsive

Live Webpage

  1. Project Goals
    1. User Goals
    2. Site Owner Goals
  2. User Experience
    1. Target Audience
    2. User Stories
  3. Structure
    1. Initial Framework
  4. Technologies Used
    1. Languages
    2. Frameworks & Tools
  5. Features
  6. Testing
    1. Manual Testing
    2. Device testing
    3. Browser compatibility
  7. Validation
    1. Python
  8. Bugs Fixed
  9. Deployment
  10. Credits
    1. Content

Project Goals

User Goals

  1. Able to play a game of hangman
  2. Clearly know how many guesses remain
  3. Clearly shown if win the game
  4. Clearly shown if lose the game
  5. Fun easy experience of playing

Site Owner Goals

  1. Give the user variation of the word to guess (Boys names v Girls names)
  2. Provide the user a limited number of attempts at guessing letters with an update to the number of remaining attempts
  3. Provide positive feedback for a correct guess
  4. Provide feedback for an incorrect guess
  5. Account for user input being in lower or uppercase

User Experience

Target Audience

  • People wanting to play an online game
  • People with spare time and access to a computer
  • People who enjoy logical quizzes
  • People who enjoy guessing games

Structure

Initial Framework

Before starting the website I used a flowchart design tool called Lucid Charts to mockup a flow of information.

Lucid Chart

Technologies Used

Languages

  • Python

Frameworks and Tools

  • Git
  • GitHub
  • Gitpod
  • Paint.NET
  • Lucid Chart
  • Heroku

Features

Existing Features

  • Choice of boys name or girls name

    • The user can decide which gender of name they wish to guess

    Enter choice

  • Good luck message

    • The user is displayed a good luck message

    Good luck

  • Word shown as underscores

    • The user is displayed a the word with the letters replaced by '_' to show the length of the word

    Good luck

  • Enter a letter area

    • The user is displayed an 'enter a letter' phrase and an area to enter said letter

    Good luck

  • Invalid entry

    • The user is displayed a message to advise of an invalid entry when a letter is not the input

    Good luck

  • Duplicated guess

    • The user is displayed a message to advise they have already tried to guess that letter

    Good luck

  • Correct guess

    • The user is displayed a message to advise they have correctly guessed a letter. With the underscore transforming into the guessed letter where applicable

    Good luck

  • Incorrect guess

    • The user is displayed a message to advise they have been unsuccessful at guessing a letter

    Good luck

  • Tries counter

    • The user has a limited number of guesses which is displayed when an incorrect letter is guessed

    Good luck

  • No more tries

    • The user has a limited number of guesses which ends the game when this number runs out

    Good luck

  • Correct word

    • The user is shown a congratulatory message and the word when they guess all the letters

    Good luck

  • Play again

    • The user has the option to play again when the game has been completed

    Good luck

Features Left to Implement

  • Add a username

Testing

Manual Testing

  • Tested choice of list works - Choosing Boy list or Girl list
  • Tested inputting a number would throw an error and inform the user input was invalid
  • Tested inputting a valid guess
  • Tested for inputting a correct guess and showing the correct message on screen
  • Tested for inputting an incorrect guess and showing the correct message on the screen
  • Tested for running out of attempts at guesses and being shown the correct message on screen
  • Tested for completing the word and being shown the correct message on screen
  • Tested for wanting to play again
  • Tested for not wanting to play again

Perform test on devices

The website was tested on the following devices:

  • MacBook Pro
  • MacBook

Browser compatability

The website was tested on the following browsers:

  • Chrome
  • Safari
  • Edge

Validator Testing

Python

Code validation completed by PEP8 and returned no errors

Python

Bugs Fixed

  • Lowercase letter issue
    • When inputting the initial decision for choosing a boy or girl name the if statement was not catching the decision. Utilised the .upper() function in Python to ensure the decision was a capital regardless of user decision
  • If statement order of running
    • When checking for if a user had already attempted a guess at that letter the if statement was incorrectly sequenced so the program congratulated the user. By switching the order of checking the if statement catches a previously guessed letter

Deployment

The website was deployed using Heroku by following these steps:

  1. Log into Heroku
  2. Select Create New App
  3. Name your app and select location
    Heroku Deployment

  4. Enter the settings tab. Add the required buildpacks
    Heroku Deployment Buildpacks

  5. From the settings tab add the required Config Vars
    Heroku Deployment Config Vars

  6. Select the Deploy tab. Connect to your required GitHub repository
    Heroku Deployment GitHub

  7. From the Deploy tab scroll to the bottom and select 'Deploy'
    Heroku Deployment

You can for fork the repository by following these steps:

  1. Go to the GitHub repository
  2. Click on Fork button in upper right hand corner

You can clone the repository by following these steps:

  1. Go to the GitHub repository
  2. Locate the Code button above the list of files and click it
  3. Select if you prefer to clone using HTTPS, SSH, or Github CLI and click the copy button to copy the URL to your clipboard
  4. Open Git Bash
  5. Change the current working directory to the one where you want the cloned directory
  6. Type git clone and paste the URL from the clipboard ($ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY)
  7. Press the Enter key to create your local clone.

The live link can be found here - https://ci-pp3.herokuapp.com/

Credits

Content

ci_pp3's People

Contributors

harryrhayden avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.