Workshop › Hangman › Step 36 of 36
Build it yourself: a hint button
What we are doing
Your game, your rules. Add a Hint button: clicking it reveals one hidden letter of the word, but it costs a miss.
Your turn
- Draw a box at (380, 180), 80 wide and 36 tall, with the text
Hint on it.
- While playing, a click inside that box reveals one letter of the word that is not guessed yet and adds one miss.
- If that letter completes the word, you win, as usual. After the game, a click still starts a new word.
Skills: Keyboard and mouse input, Game states
← Tap a key
All steps
- A list of secret words
- The canvas and the pen
- Paint the paper
- A function that draws
- Pick a random word
- Write the word
- Hide it behind blanks
- Remember the guesses
- Draw again and again
- A guess
- Guess with the keyboard
- Only letters count
- Count the misses
- The same letter twice is free
- Six misses at most
- Show the misses
- List the wrong letters
- Draw a line
- The gallows
- The first miss: a head
- Body, arms and legs
- The parts in a list
- Losing
- Winning
- Show the word you missed
- The end message
- Play again
- Never the same word twice
- A winning streak
- Remember the best streak
- Where each key goes
- Draw the keys
- Center the last row
- Keys that remember
- Tap a key
- Build it yourself: a hint button