1. Introduction
---------------

This sub-directory contains programs that can generate the Freecell board of
several popular Freecell implementations, in the format understood by
Freecell Solver.

They include:

make_pysol_freecell_board.py
    A Python script that generates the boards of the various games of PySol
    and PySolFC.

pi-make-microsoft-freecell-board
    A program that generates the boards of Microsoft Freecell and
    Freecell Pro.

2. Building
-----------

Use the main directory's CMake build-system to build them.

3. Invocation
-------------

The programs accept the board number as their single command-line argument,
and output the board to the standard output.

"fc-solve" reads the board from the standard input in case
the board file is "-" or unspecified. Therefore, you can solve a given board
like that:

# [Board Generation Program Name] [Board Number] | fc-solve

For example, to solve Microsoft's FreeCell Deal No. 15789:

# pi-make-microsoft-freecell-board -t 15789 | fc-solve

make_pysol_freecell_board.py also accepts another optional argument which
specifies the game. Available games are:

     bakers_game          - Baker's Game
     bakers_dozen         - Baker's Dozen (Broken)
     beleauguered_castle  - Beleaguered Castle
     citadel              - Citadel
     cruel                - Cruel
     der_katz             - Der Katzenschwantz
     die_schlange         - Die Schlange
     eight_off            - Eight Off
     fan                  - Fan
     forecell             - Forecell
     freecell             - Freecell
     good_measure         - Good Measure
     ko_bakers_game       - Kings' Only Baker's Game
     relaxed_freecell     - Relaxed Freecell
     relaxed_seahaven     - Relaxed Seahaven Towers
     seahaven             - Seahaven Towers
     simple_simon         - Simple Simon
     streets_and_alleys   - Streets and Alleys

For example, to generate "Eight Off" board No. 168, type:
# make_pysol_freecell_board.py 168 eight_off

You can then use the "--game" option of Freecell Solver to solve this
particular game:

# make_pysol_freecell_board.py 168 eight_off | fc-solve --game eight_off

If you wish the programs to print the 10 cards with "T"'s instead of
"10", then place a "-t" flag immediately after the board generation
program's name. For example:

# make_pysol_freecell_board.py -t 24
# pi-make-microsoft-freecell-board -t 11982
# make-aisleriot-freecell-board -t 890 seahaven

4. Notes
--------

"make_pysol_freecell_board.py" and "pi-make-microsoft-freecell-board" generate
the same boards for board numbers up to 32000. One can tell
make_pysol_freecell_board.py to generate PySolFC deals using the "-F" flag
and to generate Microsoft deals, even for large numbers by prefixing the
number with "ms" (e.g: "ms100000").
