Hangman on Rails


Just for fun, I wrote a game of Hangman on Rails (5rc1).


Source: https://github.com/kofno/HangmanRails


I just played a few games - nice :023:


Works nicely. Why is every button a form in itself and not just a button in one form?


I was playing with modeling each letter as a Guess resource. I could’ve built a single Guess form from a new object and created different button for each possible guess, and then used the submit button value as value. But this worked so well, and was such a natural fit, that I couldn’t see a reason to go back and change it.


Really addictive, congratulations!


Thanks! I’m toying with a two player version, that uses websockets. I was actually trying Volt for that, but I got stuck on a weird problem.


Awesome! What kind of problem you got? I am not into Volt but probably someone here might help you…


I’m having some trouble with volt not always finding my templates when I use the <:form > style syntax. I think I may grab the source and see how it’s looking for them. I thought maybe it was something weird with the forking server, but I’m certain.