You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdegames/kpat/freecell-solver
Alexander Golubev 22eaaf4699
Initial cmake conversion
9 years ago
..
CMakeLists.txt Initial cmake conversion 9 years ago
CREDITS Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
INSTALL Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
Makefile.am Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
Makefile.lite Fixed FTBFS on Slackware. This resolves bug 2046. 11 years ago
README Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
USAGE rename the following methods: 13 years ago
alloc.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
alloc.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
app_str.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
app_str.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
caas.c Fixed FTBFS on Slackware. This resolves bug 2046. 11 years ago
caas.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
card.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
card.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
cl_chop.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
cl_chop.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
cmd_line.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs.h Fix inadvertent "TQ" changes. 13 years ago
fcs_cl.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs_config.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs_dm.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs_dm.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs_enums.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs_hash.c rename the following methods: 13 years ago
fcs_hash.h rename the following methods: 13 years ago
fcs_isa.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs_isa.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs_move.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
fcs_user.h Remove the tq in front of these incorrectly TQt4-converted methods/data members: 14 years ago
freecell.c rename the following methods: 13 years ago
intrface.c Fix inadvertent "TQ" changes. 13 years ago
jhjtypes.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
lib.c Remove the tq in front of these incorrectly TQt4-converted methods/data members: 14 years ago
lookup2.c rename the following methods: 13 years ago
lookup2.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
main.c Fix inadvertent "TQ" changes. 13 years ago
move.c Fixed FTBFS on Slackware. This resolves bug 2046. 11 years ago
move.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
ms_ca.h Fixed FTBFS on Slackware. This resolves bug 2046. 11 years ago
pqueue.c Fix unintended renaming 11 years ago
pqueue.h Fix unintended renaming 11 years ago
prefix.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
preset.c Remove the tq in front of these incorrectly TQt4-converted methods/data members: 14 years ago
preset.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
rand.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
rand.h Fixed FTBFS on Slackware. This resolves bug 2046. 11 years ago
scans.c Fix inadvertent "TQ" changes. 13 years ago
simpsim.c rename the following methods: 13 years ago
state.c Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
state.h Remove additional unneeded tq method conversions 13 years ago
test_arr.h Remove additional unneeded tq method conversions 13 years ago
tests.h Remove additional unneeded tq method conversions 13 years ago

README

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

This is Freecell Solver version 2.8.x, a program that automatically
solves most Freecell and Simple Simon games.

Freecell Solver is distributed under the public domain.

I hope you'll enjoy using it, and make the best of it.

    Shlomi Fish (shlomif@vipe.technion.ac.il)

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

Read the file "INSTALL" for information on how to do that. For the impatient:
type:

./configure
make
make install

3. Usage
--------

The program is called "fc-solve". You invoke it like this:

fc-solve board_file

board_file is the filename with a valid Freecell startup board. The file is
built as follows:

It has the 8 Freecell stacks.
Each stack contain its number of cards separated by a whitespace
and terminated with a newline character( it's important that the last stack
will also be terminated with a newline !). The cards in the line are ordered
from the bottom-most card in the left to the topmost card in the right.

A card string contains the card number followed by the card deck. The card
number is one of: A,1,2,3,4,5,6,7,8,9,10,J,Q,K. The card deck is one of: 
H,S,D,C (standing for Hearts, Spades, Diamonds and Clubs respectively).

Here is an example board: (PySol board No. 24)

4S 2S 9S 8S QC 4C 2H
5H QH 3S AS 3H 4H QD
QS 9C 6H 9H 3C KC 3D
5D 2C JS 5S JH 6D AC
2D KD 10H 10S 10D 8D
7H JC KH 10C KS 7S
AH 5C 6C AD 8H JD
7C 6S 7D 4D 8C 9D

And another one: (PySol board No. 198246790)

KD JH 5H 7D 9H KS 9D
3H JD 5D 8H QH 7H 2D
4D 3C QS 3S 6C QC KC
10S 9C 6D 9S QD 8C 10D
10C 8S 7C 10H 2S AC
8D AS AH 4H JS 4S
6H 7S 4C 5C 5S JC
AD KH 6S 2H 3D 2C

You can specify the contents of the freecells by prefixing the line with
"FC:". For example:
FC: 3H QC

will specify that the cards 3 of hearts and queen of clubs are present in
the freecells. To specify an empty freecell use a "-" as its designator.

If there's another "FC:" line, the previous line will be overriden.

You can specify the contents of the foundations by prefixing the line with
"Founds:" and then using a format as follows:

Founds: H-5 C-A S-0 D-K

Hence, the deck ID followed by a dash followed by the card number in the
foundation. A suit that is not present will be assumed to be 0. Again, if 
there's more than one then the previous lines will be overriden.


The program will stop processing the input as soon as it read 8 lines of
standard stacks. Therefore, it is recommended that the foundations and
freecells lines will come at the beginning of the file.

The program will process the board and try to solve it. If it succeeds it
will output the states from the initial board to its final solution to the
standard output. If it fails, it will notify it.

For information about the various command-line switches that Freecell 
Solver accepts, read the USAGE file in this directory.

To solve Simple Simon boards append "--game simple_simon" right after 
the "fc-solve" program name.

4. The board generation programs
--------------------------------

Several programs which can generate the initial boards of various Freecell
implementations can be found in the "board_gen/" sub-directory. Read the 
"README" file there for details on how they can be compiled and used.

In any case, they can save you the time of inputting the board yourself.