00001 #ifndef FCS_FREECELL_SOLVING_ALGORITHM_H 00002 #define FCS_FREECELL_SOLVING_ALGORITHM_H 00003 00011 00012 #include "FCSFreecellData.h" 00013 #include "FCSFreecellAlgorithm.h" 00014 00016 class FCSFreecellSolvingAlgorithm : public FCSFreecellData, public FCSFreecellAlgorithm 00017 { 00018 public: 00019 00026 static FCSFreecellSolvingAlgorithm* Create(FCCommandLineArguments* CommandLine); 00027 00029 virtual ~FCSFreecellSolvingAlgorithm(); 00030 00031 protected: 00033 FCSFreecellSolvingAlgorithm(); 00034 00036 FCSFreecellSolvingAlgorithm(FCCommandLineArguments* CommandLine); 00037 00045 inline void FlipTopCard(FCSStateWithLocations *State, int Stack, FCSMove* Move, FCSMoveStack** MoveStack); 00046 00056 virtual FCSStateSolvingReturnCodes RunTest(int TestNumber, FCSStateWithLocations* StateWithLocations, 00057 int Depth, int NumberOfFreeStacks, 00058 int NumberOfFreecells, 00059 FCSDerivedStatesList* DerivedStateList); 00060 00070 FCSStateSolvingReturnCodes MoveTopStackCardsToFounds(FCSStateWithLocations* StateWithLocations, 00071 int Depth, 00072 int NumberOfFreeStacks, 00073 int NumberOfFreecells, 00074 FCSDerivedStatesList* DerivedStateList); 00075 00084 FCSStateSolvingReturnCodes MoveFreecellCardsToFounds(FCSStateWithLocations* StateWithLocations, 00085 int Depth, 00086 int NumberOfFreeStacks, 00087 int NumberOfFreecells, 00088 FCSDerivedStatesList* DerivedStateList); 00089 00098 FCSStateSolvingReturnCodes MoveFreecellCardsToTopOfStacks(FCSStateWithLocations* StateWithLocations, 00099 int Depth, 00100 int NumberOfFreeStacks, 00101 int NumberOfFreecells, 00102 FCSDerivedStatesList* DerivedStateList); 00103 00112 FCSStateSolvingReturnCodes MoveNonTopStackCardsToFounds(FCSStateWithLocations* StateWithLocations, 00113 int Depth, 00114 int NumberOfFreeStacks, 00115 int NumberOfFreecells, 00116 FCSDerivedStatesList* DerivedStateList); 00117 00126 FCSStateSolvingReturnCodes MoveStackCardsToDifferentStacks(FCSStateWithLocations* StateWithLocations, 00127 int Depth, 00128 int NumberOfFreeStacks, 00129 int NumberOfFreecells, 00130 FCSDerivedStatesList* DerivedStateList); 00131 00140 FCSStateSolvingReturnCodes MoveStackCardsToAParentOnTheSameStack(FCSStateWithLocations* StateWithLocations, 00141 int Depth, 00142 int NumberOfFreeStacks, 00143 int NumberOfFreecells, 00144 FCSDerivedStatesList* DerivedStateList); 00145 00154 FCSStateSolvingReturnCodes MoveSequencesToFreeStacks(FCSStateWithLocations* StateWithLocations, 00155 int Depth, 00156 int NumberOfFreeStacks, 00157 int NumberOfFreecells, 00158 FCSDerivedStatesList* DerivedStateList); 00159 00168 FCSStateSolvingReturnCodes MoveFreecellCardsToEmptyStack(FCSStateWithLocations* StateWithLocations, 00169 int Depth, 00170 int NumberOfFreeStacks, 00171 int NumberOfFreecells, 00172 FCSDerivedStatesList* DerivedStateList); 00173 00182 FCSStateSolvingReturnCodes MoveCardsToADifferentParent(FCSStateWithLocations* StateWithLocations, 00183 int Depth, 00184 int NumberOfFreeStacks, 00185 int NumberOfFreecells, 00186 FCSDerivedStatesList* DerivedStateList); 00187 00196 FCSStateSolvingReturnCodes EmptyStackIntoFreecells(FCSStateWithLocations* StateWithLocations, 00197 int Depth, 00198 int NumberOfFreeStacks, 00199 int NumberOfFreecells, 00200 FCSDerivedStatesList* DerivedStateList); 00201 00202 }; 00203 00204 #endif