This time, I choose to code a Klondike Solitaire game, because it's probably the best known solitaire in the world. Thus, everyone should know its rules and can start to play immediately for free...
For fun (and because I'm used to it), I tried to copy the game play from Windows Solitaire:
I wanted to play solitaire online on a tablet (and maybe phone). So I use a responsive design to make the display part. I didn't want to go with Bootstrap and just made it basic by following a really simple guide to responsive design by Adam Kaplan. There are 7 piles in the Klondike Solitaire game, so I just build a 7 columns grid.
I have not used 52 images (one per card), but rather a single grid of images. That was pretty easy because I had already used this technique through the article CSS Sprites: Image Slicing’s Kiss of Death by Dave Shea. Once my sprite was ready, TinyPNG was useful to optimize its size.
After coding the game, I played with it to debug. A lot. Then I bought a domain name and here we are, with yet another free online solitaire game!
And remember, it's a responsive game. You can play Klondike Solitaire with phone, tablet or desktop!
If you have questions or comments about the game, feel free to contact me at the email "michel.c at gmail".