Skip to content

C++ practice project to create a solver for some solitare games

License

Notifications You must be signed in to change notification settings

madfist/solitare_solver

Repository files navigation

solitare_solver

C++ practice project to create a solver for some solitare games

Build and test

mkdir build
cmake -Bbuild .
make -Cbuild
make -Cbuild test

If built on cygwin after the downloading of googletest modify its CMakeFiles.txt to enable compiler extension and run cmake again.

Build release version

cmake -Brelease -DCMAKE_BUILD_TYPE=Release .
make -Crelease

Run

./solitare_solver -h

Solve various solitare games
Usage:
  Solitare Solver [OPTION...]

  -g, --game arg   solitare game type (scorpion|klondike) (default: scorpion)
  -i, --input arg  input game state
  -v, --verbose    info messages
  -d, --debug      debug messages
  -p, --parallel   use parallel solver
  -f, --filter     filter valid steps
  -s, --steps arg  steps to run
  -h, --help       display this help

Documentation

Doxygen documentation is available here.

It can also be generated (build/docs/html/index.html):

make -Cbuild docs

Memory check

make -Cbuild test ARGS="-T memcheck"

Coverage

The project uses CTest and CDash from CMake, but doesn't have a public profile, so the CDash server can be run with the help of docker.

cp .env.example .env
docker-compose run --rm cdash install configure
docker-compose up -d

Then create a project SolitareSolverUnitTests in CDash (http://localhost:8080).

To test and submit coverage run:

make -Cbuild Experimental

Using

About

C++ practice project to create a solver for some solitare games

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published