Shiritori
Shiritori (しりとり) is a Japanese word game in which the players are required to say a word which begins with the final kana of the previous word. “Shiritori” literally means “taking the end” or “taking the rear”. For the kata, we will use the final letter instead of the final kana for each word. Gameplay example:
Player1: Cat Player2: Tongue P1: End P2: Data P1: Allergic P2: Cat
Green belt
Manage gameplay for 2 players using this dictionary:
[ ‘allergic’, ‘cat’, ‘data’, ‘end’, ‘tongue’ ]
You can add words to the dictionary if you want, but remember to Keep It Simple. |
Red belt
The player that lasts more than 10s to give a valid word loses the game. Remember to keep tests fast. Test suite can’t take >10 s to finish. |
Black Belt
Words must appear in real dictionary. This will require you to call an API and authenticate with an API key. For testing, you will need to stub your request
For real calls, you can use a web service, like Big Huge Thesaurus