Karl-Heinz Reisenauer
01.02.2017
In the spirit of this idea, I found a hangman game written in R by Marek Hlavac.
Excited from this idea, I also wanted to create such a mini game as a Shiny Application …
The idea for this project was born.
The most important thing for such a game is the game data
Fortunately, Marek Hlavac already has a nice collection of words to guess, including the category as a reference.
They are all found in the file “hangman.rdata”, which I used as the basis for the application
load("hangman.rdata")
paste("category:",length(unique(hangman$word)),
", words:", length(hangman$word))
[1] "category: 1266 , words: 1291"
The small survey shows that there are 1291 words in 13 categories to guess.
So there is plenty of variety
Of course, it needs an appealing GUI and top graphics to increase the guessing fun and to offer the player a great playing experience.
| |
So that the user keeps the overview, all already used letters are marked. To guess, only one letter must be entered into the text field. A new game can be started at any time by clicking the “new game” Button. |
Of course you have to guess right to win …
Thanks to Marek Hlavac, who has shown that you can have fun with R not only with statistical ways.
The original can be found here: https://sites.google.com/site/marekhlavac/computer-games-written-in-r