TerminalSolitaire allows you to play classical solitaire game inside your terminal.You can control cards using commands inside game shell
- Install TerminalSolitaire using the installation instructions below
- Learn how to play reading "How to play" instructions bellow
- Enjoy the game!
gitpython >= 3.13- A terminal emulator which supports color rendering
- Clone this repository
- Move into cloned repository root directory
- Launch game with
uv run src/main.py
- Clone this repository
- Move into the cloned repository's root directory
- Create virtual environment with
python -m venv venv - Source virtual environment using:
source venv/bin/activateon Unix based OSsource.\venv\Scripts\activateon Windows.
- Install necessary packages with
pip install -r requirements.txt - Launch game with
python src/main.py
To play the game, use the following commands:
draw: Take a card from the deckplace [column_number]: Place the last card from the taken ones on the table in the specified columnflip [column_number]: Flip a card in the specified columnmove [source_column] [destination_column]: Move a card from one column to another. You can also use the following separators:->,:,=>,=,>,>>foundation: Move cards to the foundation piles (in ascending order, same suit)refresh: Refresh game tablerestart: Restart the gamehelp: Shows list of all available commands
drawplace 3(places the card in column 3)flip 2(flips a card in column 2)move 1 3ormove 1 -> 3(moves a card from column 1 to column 3)
- The goal of Solitaire is to move all cards to the foundation piles
- Cards in the tableau (columns) must be in descending order (King to Ace) and alternating colors (red and black)
- Use the
movecommand to build sequences and move cards to the foundation piles
To contribute to this repository:
- Fork the repository
- Clone the forked repository to your local machine
- Create a new branch for your contribution
- Make changes, commit, and push to your fork
- Create a pull request to the original repository
Please:
- Follow the existing coding style
- Test new features
- Use commit messages that are meaningful and consistent in style with existing ones
TerminalSolitaire is a free software and its released under the terms of the GNU GPL v3 LICENSE file