Solvitaire requires a C++14 compiler, CMake 3.14+, and the Boost libraries.
The compiled Boost component needed is program_options; several header-only components
(multi_index, optional, pool, property_tree, random) are also used and are
included automatically with any standard Boost installation.
The primary development branch is dev, which is tested on macOS (Apple Silicon) and Linux (x86_64 / arm64).
Prerequisites (Homebrew):
brew install cmake boostBuild:
./build.sh # release build (default)
./build.sh --release --unit-tests # also build test binaryTest:
cd cmake-build-release
ctest -R '^unit_tests$' --output-on-failureRun:
./cmake-build-release/bin/solvitaire --type klondike --random 42Prerequisites (Ubuntu 22.04 / Debian):
sudo apt-get install build-essential cmake libboost-program-options-dev git python3Build:
./build.sh # release build
./build.sh --release --unit-tests # also build test binaryTest:
cd cmake-build-release
ctest -R '^unit_tests$' --output-on-failureRun:
./cmake-build-release/bin/solvitaire --type klondike --random 42Requires the Apple container CLI, Docker, or Podman.
Build image and run unit tests:
./scripts/container-build.sh --testBuild image and run Level 1 regression suite:
./scripts/container-build.sh --regressionBuild image only:
./scripts/container-build.shInteractive shell inside the container:
container run --rm -it solvitaire-dev bashBy default the script forces a clean build on every run (to avoid stale-cache issues with container CLI v0.9). Pass --use-cache to reuse the apt install layer when on a slow network.
List supported game types:
./cmake-build-release/bin/solvitaire --available-game-typesSolve a random Klondike deal (seed 42):
./cmake-build-release/bin/solvitaire --type klondike --random 42Solve from a JSON deal file:
./cmake-build-release/bin/solvitaire --type free-cell path/to/deal.jsonKey options: --type, --random <seed>, --json, --timeout <ms>,
--cache-capacity <n>, --streamliners {none|auto-foundations|suit-symmetry|both|smart},
--solvability <N>.
If you have any problems, please open an issue on GitHub.
Thanks goes to these wonderful people (emoji key):
Charlie Blake 💻 🎨 🤔 |
Ian Gent 💻 🎨 🤔 |
Shlomi Fish 💻 |
Gal Cohensius 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!