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++ (I reccomend g++)
- to be openned in terminal
On linux/macOS
git clonethe repo or install the zip- compile the
.cppfile (g++ blackjack.cpp -o blackjack -lncurses) ./blackjack- h - hit
- s - stay
- q - quit
- y/n for another hand
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
-
try with
wgetbut who knows how you will compile iit -
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.
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.