2018-09-02 15:56:22 +00:00
|
|
|
# -*-org-*-
|
|
|
|
|
2018-09-02 15:17:11 +00:00
|
|
|
* tty-solitaire
|
|
|
|
Ncurses-based klondike solitaire game.
|
|
|
|
|
|
|
|
#+CAPTION: ttysolitaire gameplay
|
|
|
|
[[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
|
2020-11-11 09:19:10 +00:00
|
|
|
[[https://repology.org/project/tty-solitaire/versions][https://repology.org/badge/vertical-allrepos/tty-solitaire.svg]]
|
|
|
|
|
2020-05-31 19:57:08 +00:00
|
|
|
*** Using package managers
|
|
|
|
**** Arch Linux
|
|
|
|
#+begin_src bash
|
|
|
|
pacman -S tty-solitaire
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
**** macOS
|
|
|
|
#+begin_src bash
|
|
|
|
brew install tty-solitaire
|
|
|
|
#+end_src
|
|
|
|
|
2021-08-31 12:07:55 +00:00
|
|
|
**** Debian [[https://wiki.debian.org/DebianTesting][testing]]
|
|
|
|
#+begin_src bash
|
|
|
|
apt install tty-solitaire
|
|
|
|
#+end_src
|
|
|
|
|
2020-11-11 09:20:36 +00:00
|
|
|
**** Nix
|
|
|
|
#+begin_src bash
|
|
|
|
nix-env --install tty-solitaire
|
|
|
|
#+end_src
|
|
|
|
|
2020-05-31 19:57:08 +00:00
|
|
|
**** Void Linux
|
|
|
|
#+begin_src bash
|
|
|
|
xbps-install -S tty-solitaire
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
**** FreeBSD
|
|
|
|
#+begin_src bash
|
|
|
|
pkg install tty-solitaire
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
**** Slackware
|
|
|
|
[[https://www.slackbuilds.org/repository/14.2/games/tty-solitaire/][Via Slackbuilds]].
|
|
|
|
|
|
|
|
**** ALT Linux
|
|
|
|
#+begin_src bash
|
|
|
|
apt-get install tty-solitaire
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
We still need help making tty-solitaire available on Ubuntu, Fedora, Gentoo,
|
|
|
|
and more. Please give us a hand at [[https://github.com/mpereira/tty-solitaire/issues/29][issue #29]] if you think you can help.
|
|
|
|
|
2018-09-02 15:17:11 +00:00
|
|
|
*** 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.
|
2020-05-31 19:57:08 +00:00
|
|
|
|
2018-09-02 15:17:11 +00:00
|
|
|
***** Ubuntu
|
2020-05-31 19:57:08 +00:00
|
|
|
#+begin_src bash
|
2018-09-02 15:17:11 +00:00
|
|
|
sudo apt-get install libncurses5-dev libncursesw5-dev
|
2020-05-31 19:57:08 +00:00
|
|
|
#+end_src
|
|
|
|
|
2018-09-02 15:17:11 +00:00
|
|
|
***** macOS
|
|
|
|
macOS has Ncurses with wide character support out of the box, so *there's
|
2020-05-31 19:57:08 +00:00
|
|
|
nothing you need to do*.
|
|
|
|
|
|
|
|
*If* for some reason you want to use other Ncurses libraries (from
|
2018-09-02 15:17:11 +00:00
|
|
|
Macports, Homebrew, etc.) you are able to do it by specifying =LDLAGS= in
|
|
|
|
the make invocation. See [[https://github.com/mpereira/tty-solitaire/pull/8][this pull request]] for more information.
|
2020-05-31 19:57:08 +00:00
|
|
|
|
2018-09-02 15:17:11 +00:00
|
|
|
**** Install tty-solitaire
|
2020-05-31 19:57:08 +00:00
|
|
|
#+begin_src bash
|
2021-09-03 16:03:20 +00:00
|
|
|
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
|
2020-05-31 19:57:08 +00:00
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
#+end_src
|
2018-09-02 15:17:11 +00:00
|
|
|
|
|
|
|
** Play
|
|
|
|
Run in your favorite shell:
|
2020-05-31 19:57:08 +00:00
|
|
|
|
|
|
|
#+begin_src bash
|
2018-09-02 15:17:11 +00:00
|
|
|
ttysolitaire
|
2020-05-31 19:57:08 +00:00
|
|
|
#+end_src
|
2018-09-02 15:17:11 +00:00
|
|
|
|
|
|
|
** Usage
|
2020-05-31 19:57:08 +00:00
|
|
|
#+begin_src text
|
2020-06-01 14:00:06 +00:00
|
|
|
usage: ./ttysolitaire [OPTIONS]
|
|
|
|
-v, --version Show version
|
|
|
|
-h, --help Show this message
|
|
|
|
-p, --passes Number of passes through the deck (default: 3)
|
2020-06-01 14:51:26 +00:00
|
|
|
--four-color-deck Draw unique card suit colors (default: false)
|
2020-06-01 14:00:06 +00:00
|
|
|
--no-background-color Don't draw background color (default: false)
|
2020-05-31 19:57:08 +00:00
|
|
|
#+end_src
|
2018-09-02 15:17:11 +00:00
|
|
|
|
|
|
|
** Development
|
|
|
|
*** Get the code
|
2020-05-31 19:57:08 +00:00
|
|
|
#+begin_src bash
|
2018-09-02 15:17:11 +00:00
|
|
|
git clone https://github.com/mpereira/tty-solitaire.git
|
2020-05-31 19:57:08 +00:00
|
|
|
#+end_src
|
|
|
|
|
2018-09-02 15:17:11 +00:00
|
|
|
*** Run the unit tests
|
2020-05-31 19:57:08 +00:00
|
|
|
#+begin_src bash
|
2018-09-02 15:17:11 +00:00
|
|
|
make test
|
2020-05-31 19:57:08 +00:00
|
|
|
#+end_src
|
2018-09-02 15:17:11 +00:00
|
|
|
|
2020-05-31 20:02:58 +00:00
|
|
|
*** [[https://invisible-island.net/ncurses/man/ncurses.3x.html][Ncurses documentation]]
|
|
|
|
|
|
|
|
*** [[https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/][Ncurses programming HOWTO]]
|
2018-09-02 15:17:11 +00:00
|
|
|
|
|
|
|
** Author
|
|
|
|
[[http://murilopereira.com][Murilo Pereira]]
|
|
|
|
|
|
|
|
** License
|
|
|
|
[[https://github.com/mpereira/tty-solitaire/blob/master/LICENSE][MIT]]
|