Skip to content

mpereira/tty-solitaire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tty-solitaire

Ncurses-based klondike solitaire game.

https://raw.github.com/mpereira/tty-solitaire/master/resources/ttysolitaire.gif

Dependencies

  • Terminal emulator with UTF-8 support
  • C library with multibyte locales support
  • Ncurses with wide-char/UTF-8 support

Install

https://repology.org/badge/vertical-allrepos/tty-solitaire.svg

Using package managers

Arch Linux

pacman -S tty-solitaire

macOS

brew install tty-solitaire

Debian testing

apt install tty-solitaire

Nix

nix-env --install tty-solitaire

Void Linux

xbps-install -S tty-solitaire

FreeBSD

pkg install tty-solitaire

Slackware

Via Slackbuilds.

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

Author

Murilo Pereira

License

MIT