Hangman on Rails


#1

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

https://cryptic-scrubland-16241.herokuapp.com

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


#2

I just played a few games - nice :023:


#3

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


#4

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.


#5

Really addictive, congratulations!


#6

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.


#7

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


#8

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.