Blackjack on the web

Posted on: Monday, Mar 24, 2014

Blackjack cards and chipsIn week 3 of the Ruby on Rails online bootcamp I had to remake the Blackjack game using the web framework, Sinatra.

As this would be the third time making the Blackjack game, that game logic wasn’t that much of a problem anymore. However, getting used to Sinatra and suddenly making a web application proved to be a whole new learning experience.

After programming a couple of hours, the basic version of the online Blackjack game was finished. The next day I’ve spent some more hours polishing and finetuning the game.

As I wanted everyone to be able to play the game without having the need to clone the Git repository and run the app locally, I’ve decided to try to get the game running on Heroku. As easy as it seems, I still ran into a couple of problems, but within the hour the game was running on Heroku. With Heroku’s excellent free custom domain feature, I was even able to have it running as a subdomain of codefish.org.

If you want to play the online version of my awesome Blackjack game (note the sarcasm ;-), click here:

>> blackjack.codefish.org <<

 

Note; it may take a couple of seconds to start up the application at the first request. This is because Heroku’s worker process sleeps when it has been inactive for a hour.
The code is available in the GitHub repository blackjack-web.