icon i made a card game


- 14 Jan 2026

* Solo21: It's a Solitaire-type game, inspired by Blackjack.


* The rules:

* The game is played with a 54-cards deck (including 2 wild cards).

* The goal of each hand is to get a card total higher than the opponent card total without exceeding 21.

* Card values:

0 2-10 11 12 13 14

* Each hand begins by revealing the first card and the first opponent card;

* For each subsequent hand card a choice has to be made, either to reveal the card or skip it.

* Afterwards, the corresponding opponent card is revealed;

* The last opponent card is not revealed if the opponent card total is 17 or higher.

* The hand is won if:

  • the card total hits 21;
  • the card total is higher than the opponent card total;
  • the opponent card total is higher than 21.

* The hand is lost if:

  • the opponent card total hits 21;
  • the card total is lower than or equal to the opponent card total;
  • the card total is higher than 21.

* When a hand is won, all revealed (face-up) cards are taken as Points; the rest are discarded.

* If a hand is won with a card total of 21, all 6 cards in play are taken as Points.

* Game ends when the whole deck is exhausted (after 9 hands).


* Some thoughts:

* I came up with this simple card game around September/October. I decided I wanted to share it on this website, but I thought just writing down the rules wouldn't be enough.

* So I made an interactive digital version with JavaScript. This way you can try it without having to grab a deck of cards and fully understand how it works.

* Coding it has been a fun experiment!

* Back in October I had started making it on Scratch, but I quickly lost motivation to continue when I encountered some issues I couldn't figure out how to fix.

* Some weeks later I decided to attempt coding it in JavaScript, did most of it in early November, then took a break.

* The break lasted until early January, when I finally implemented the code that checks if you've won or lost.

* The sprites of the cards are mostly from Bicycle Solitaire/Poker for Windows;

* I think my high score is 37 Points. I wonder what the highest possible score is... Is it possible to get all 54 cards as Points?

* Expect more card-related blog entries at a later date.