Beta
Hangman
41 of 64gabrielsiedler
Description:
This kata will be deleted soon.
Solve Hangman game instead
Hangman
Hangman is a paper and pencil guessing game for two or more players. One player thinks of a word, phrase or sentence and the other tries to guess it by suggesting letters, within a certain number of guesses.
Everytime the player misses a word, a part of the sketch is drawn:
If the player finds the word before being hung he wins. He has 6 chances to miss before being hung.
Your task
You have to implement the function hangman
that receives a word
and an array of letters
as arguments and has to return the result
of the game:
input:
- word: The word the player had to guess
- letters: An array with the sequence of letters which the player guessed
output:
- result:
true
if the player managed to find the word orfalse
if he was hung
Example
Input: hangman('codewars',['a','e','i','o','u','c','d','p','r','k','l','j','h'])
Expected output: false
Games
Algorithms
Similar Kata:
Stats:
Created | Dec 25, 2015 |
Published | Dec 26, 2015 |
Warriors Trained | 169 |
Total Skips | 1 |
Total Code Submissions | 703 |
Total Times Completed | 64 |
JavaScript Completions | 41 |
C# Completions | 14 |
Ruby Completions | 16 |
Total Stars | 5 |
% of votes with a positive feedback rating | 90% of 36 |
Total "Very Satisfied" Votes | 32 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 40 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |