BlackJack or 21 cards game with text user interface to be played in the terminal, made completly in c++ with the ncurses library. In this game there is an infinite numbers of packs so good luck card counting :)). Not every terminal supports symbols so i have C - clubs, S - spades, H - hearts and D - diamonds
lncursesc/c++ library- compiler suited for c++
On linux/macOS
git clonethe repo or install the zip- compile the
.cppfile (g++ blackjack.cpp -o blackjack -lncurses) ./blackjack
On Android
- install Termux from the play store git clone it like before and inside paste:
pkg update && pkg upgrade && pkg install clangclang++ blackjack.cpp -o blackjack -lncurses && ./blackjack
On microslop windows
-just use git bash or mingw
-
or copy the source code in vscode idk
-
install MSYS2.
-
open MSYS2 MinGW x64 terminal.
-
run:
- pacman -Syu
- pacman -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-ncurses
-
in your repo folder:
- g++ blackjack.cpp -o blackjack.exe -lncurses
- ./blackjack.exe
-
alternative: WSL (Ubuntu) + same Linux instructions.
In browser you can use a good browser based terminal to play it, i reccomend github codespaces (replit or google idx were ok, but now it s just ai slop)
I am still working on the game so there is no double down or split and the UI may bug rarely.
Besides double down and split i want to add side bets like crazy seven, 21 + 3 and bust also a cash system maybe with a json so the player wont loose the cash and improve the ACE score by calculating it recursively.
