tty-solitaire
Ncurses-based klondike solitaire game.
Dependencies
- Terminal emulator with UTF-8 support
- C library with multibyte locales support
- Ncurses with wide-char/UTF-8 support
Install
Using package managers
Arch Linux
pacman -S tty-solitaire
macOS
brew install tty-solitaire
testing
Debianapt install tty-solitaire
Nix
nix-env --install tty-solitaire
Void Linux
xbps-install -S tty-solitaire
FreeBSD
pkg install tty-solitaire
Slackware
ALT Linux
apt-get install tty-solitaire
We still need help making tty-solitaire available on Ubuntu, Fedora, Gentoo, and more. Please give us a hand at issue #29 if you think you can help.
From source
Install Ncurses
tty-solitaire depends on Ncurses. Some platforms provide it out of the box and some don’t, so you might need to install it yourself.
Ubuntu
sudo apt-get install libncurses5-dev libncursesw5-dev
macOS
macOS has Ncurses with wide character support out of the box, so there’s nothing you need to do.
If for some reason you want to use other Ncurses libraries (from
Macports, Homebrew, etc.) you are able to do it by specifying LDLAGS
in
the make invocation. See this pull request for more information.
Install tty-solitaire
wget -O tty-solitaire-v1.3.1.tar.gz https://github.com/mpereira/tty-solitaire/archive/v1.3.1.tar.gz
tar xvf tty-solitaire-v1.3.1.tar.gz
cd tty-solitaire-1.3.1
make
sudo make install
Play
Run in your favorite shell:
ttysolitaire
Usage
usage: ./ttysolitaire [OPTIONS]
-v, --version Show version
-h, --help Show this message
-p, --passes Number of passes through the deck (default: 3)
--four-color-deck Draw unique card suit colors (default: false)
--no-background-color Don't draw background color (default: false)
Development
Get the code
git clone https://github.com/mpereira/tty-solitaire.git
Run the unit tests
make test