Recoded-Spark-Turkey-2022 / hangman-executioner

hangman-executioner created by GitHub Classroom
0 stars 2 forks source link

Create a hangman game

Overview

If this is the first time you hear of Hangman, I suggest you read this article and watch this video.

Instead of having another player suggest the game, we will automate this by using an API as you can see in the requirements section. Example of what we want to accomplish here. You can use it to know exactly what the game is about, but do not copy it. Use your own way. Be as creative as you can!

Example of hangman game

Requirements

  1. HTML:

    1. Add buttons that correspond to each letter from a to z.
    2. Add a section that will hold the blanks that are going to be equal to the number of characters for the current word.
    3. Add a div to show the man who's going to be hanged if you lose.
    4. Add a counter from 10 that will decrease by 1 with every wrong guess.
    5. Add a button to play again.
  2. JS:

    1. At the beginning use fetch API to retrieve a random word from this api https://random-word-api.herokuapp.com/word?number=1. Make the blanks equal the number of letters in the random word.
    2. Everytime the user clicks on one of the letters the following should happen:
      1. Search through the random word to find if it contains the clicked letter, if the clicked letter is part of the random word's letters then it gets shown up instead of the space, if not, then the lives counter is decreased by one. In some cases a clicked letter corresponds to two letters in the generated word, if that happens then show both letters. Also, with every mistake draw a part of the hangman's body. You can draw your own designs. It doesn't have to be a hangman, it can any creature that you want. Be creative with this. One of the best ways to do this is to use the HTML5 canvas element.
      2. The button becomes disabled and should only work once.
    3. If the lives counter reaches 0 then the game is over and the man should be HANGED! 👨‍🦱🔪😢
    4. Clicking on the play again button should do the whole process again.
  3. CSS: We leave this to your imagination. Generally, design something that screams with your personality. I don't want to see an exact copy of the screenshot, but I do want to see something that is fun and unique.

Team Management

Coding Phase

Git

Pull Requests

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type and a subject:

<type>: <subject>
<BLANK LINE>
<body>

The header is mandatory, while the body is optional but highly encouraged.

Type

Must be one of the following:

Subject

The subject contains a succinct description of the change:

Body

Just as in the subject, use the imperative, present tense: “change” not “changed” nor “changes”. The body should include the motivation for the change and contrast this with previous behavior.

The Code

Presentation

Your demo will be 10 minutes. We will time it. It's not meant to be a high pressure situation but we want to make sure that everyone has time to demo in the allocated time.

Requirements

Please read these instructions and prepare some thoughts on these for your demo.