Hangman on Rails

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

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

Source: GitHub - kofno/HangmanRails: Hangman... written in Ruby on Rails

3 Likes

I just played a few games - nice :023:

1 Like

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!

1 Like

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.

1 Like

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.