It is a well-known game "Hangman" in which you are to guess a word picked by server.
Actually you'll need to guess 7
words (one by one) - for each you have 9
attempts.
You make an attempt by suggesting a letter - if it is found in the word, it shows up in the "pattern" presented to you by the server and attempt is saved (i.e. attempt count only decreases on failures).
This is interactive puzzle and you play by sending HTTP requests to the server.
To start send the token to the server using GAME-NAME hangman
and the url found in
the instruction on interactive puzzles.
In every subsequent request you should add field letter
(containing your next guess). Server always responds showing pattern
with the
letters already guessed and underscores in places of those yet not guessed. Also it includes counts for attempts and words to guess.
We recommend you to try doing it manually first. However to prevent you from manually solving the puzzle there is a time limit - from
the start of the game (i.e. when you have sent token without the guess) it should take no more than 120
seconds.
Words are picked from our /data/words.txt file (open and save it or right-click and pick save/download).
Example of exchange
Let's demonstrate it with curl
command-line tool. You start the game:
curl -HContent-Type:application/json -d '{"token":"..."}' <server-address>/hangman.php
Server prepares the game state and response readily:
{"pattern":"_______","attempts":9,"words":7,"time":0}
You make your guess by sending the same request with added letter
field:
curl -HContent-Type:application/json -d '{"token":"...", "letter":"a"}' <server-address>/hangman.php
Server may say the letter is in this word (so attempts counter won't change):
{"pattern":"a______","attempts":9,"words":7,"time":0}
Or say decrease attempt counter if your guess doesn't discover new letters:
{"pattern":"_______","attempts":8,"words":7,"time":0}
When the word is guessed correctly, server immediately generates a new one (pattern becomes blank again and words
counter decreases).
If you fail there is end
field in the response and some message (attempts exhausted or time is out).
If you win, there'll be a winner's token which you should submit as an answer (below).
To restart the game you may reuse the same token (just don't send letter
field).