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-gnome-freecell-board:
    Generate the boards of the standalone Freecell program that comes with the
    GNOME desktop.

make-aisleriot-freecell-board
    Generate the Freecell boards of GNOME's AisleRiot.

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

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

make-microsoft-freecell-board
    A program that generates the Freecell board according to the 
    MS-Freecell/Freecell Pro shuffling algorithm but not according to its
    randomization method. One should probably use 
    "pi-make-microsoft-freecell-board" instead.

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

On UNIX and simliar systems with gcc installed type "make" to build the 
programs. The PySol program is written in Python so it doesn't need 
to be built.

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

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

"fc-solve" and "fc-solve-debug" read 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 GNOME's Freecell board No. 15789:

# make-gnome-freecell-board 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)
     der_katz          - Der Katzenschwantz
     die_schlange      - Die Schlange
     eight_off         - Eight Off
     forecell          - Forecell
     freecell          - Freecell
     ko_bakers_game    - Kings' Only Baker's Game
     relaxed_freecell  - Relaxed Freecell
     relaxed_seahaven  - Relaxed Seahaven Towers
     seahaven          - Seahaven Towers

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

4. Notes
--------

"make-gnome-freecell-board", "make-aisleriot-freecell-board" and 
"make-microsoft-freecell-board" all use the randomization routines of the
system's Standard C library (libc). Therefore, they will generate different
results on different systems. It is recommended that you run them on the same
type of system the game program is running on.

"make_pysol_freecell_board.py" and "pi-make-microsoft-freecell-board" on the
other hand use their own randomization functions, so they will run the same
on any platform.

"make_pysol_freecell_board.py" and "pi-make-microsoft-freecell-board" generate
the same boards for board numbers under 32000.
