Giter Club home page Giter Club logo

guess_the_word's Introduction

Guess the Word

Guess the word is a python terminal game that runs as a mock terminal app provided by Code Institute deployed on Heroku.

The game is based on the classic Hangman game, however instead of a image of a hangman every time you lose a life it just shows how many lives you have remaining.

Access the live app here Guess the Word

How to play

Guess the word is a pretty simple game. It starts off by welcoming the player and asks if they are ready to play.

It will also show the player how many lives remaining, so they understands how many guesses they have to beat the game.

The game starts of by showing the random word as spaced out underscores for the letters. This shows the player how long the word is.

The player then has the option of guessing a letter each time by typing a letter into the terminal and hitting the enter key.

The game ends either if the player guesses the word and beats the game or the player runs out of lives.

The player then has the option of playing again.

Features

  • The random word is generated after the player has guessed their first letter. If the player is correct the letter will show with in the underscores. As you can see in the first image.

Correct Guess

The second image shows the word blank as underscores because the player has not found a correct letter.

Letter not found

  • The game tracks what the player has guessed and also how many lives they have remaining. The lives decrease after an incorrect guess and the terminal also shows what letters the player has used.

Input Tracker

  • Input validation comes with a few messages depending on what the player has been inputted.

    • The first image shows that the player has input the incorrect letter

Validation 1

* The second image shows that the player put a number instead of a letter and shows a message of invalid input.

Validation 2

* The next image shows the validation that the player has won the game.

You Won

* The last image shows validation that the player has unfortunately lost the game.

Game Over

  • The last feature allows the player to play again feature, allows user to have the option of playing again. Depending on what the player would like to choose.

Play Again

Data Model

In the guess the word repository i have imported another python file that hold all the words that the run.py file randomly selects for each game.

I have also imported random.py and string.py that is prebuilt within python, this is to help with the structure of the python code.

Testing

I have passed the code through a PEP8 validator and there are no problems.

PEP 8

I have done numerous tests on the code within local terminal of GitHub.

Local Terminal

Deployment

This python project was created within GitHub and was deployed using the Code Institutes mock terminal through creating a Heroku web application.

  • Deployment of the Heroku App steps:
    • Used a cloned template for the repository from Code Institute
    • Created a new Heroku app by setting up a free account, making sure that when you set up your account that you select the correct region of where you are.
    • Once you have set up your account you are then ready to creat your app. Find the create new app button and click to move forward. Create the name of the app and remember to select the right region of where you live.
    • Once on the newly created app, find the deploy tab and link your reposiory profile, in this case using GitHub.
    • Once your repository is linked and you have found the code you want to use. You can either manualy deploy every time you push your code to your repository you have to come back to heroku to redeploy the app or you can automatically update so that everytime you push your code, it also updates the heroku app aswell.
    • Once you have done those steps you are ready to use your new app.

Credits

  • I would like to give credit to the Code Institute slack channel for ideas and support towards this project.

  • Also there were two youtube videos that helped inspire me to write this project. Getting an understanding of what a hangman type game could look like and then creating my own version of what my guess the word game looks like.

Hangman Tutorial 1 Hangman Tutorial 2

guess_the_word's People

Contributors

mbissett29 avatar

Watchers

 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.