JavaScript shithead game

I’d started work on this some time ago, but hadn’t gotten around to fixing a couple of bugs. I finally did today!

It’s the variant that I used to play a lot when I younger (and still do occasionally) so follows those rules, but I’ve tried to build it in a way that it should be possible to modify the game to meet your rules. I quite like the Deck and Card object prototypes and I’m hoping to re-use them in another card game I’m toying with making a clone of.

I’m quite happy with the card styling too, I like the effect of the card stack and, despite the bug when you hover over the right-hand edge of the last card in a hand, I’m happy with how it functions!

You can check it out here, and the source code is on github for your forking pleasure!