00001 #ifndef FCS_SIMPLE_SIMON_SOLVING_ALGORITHM_H 00002 #define FCS_SIMPLE_SIMON_SOLVING_ALGORITHM_H 00003 00011 00012 #include "FCSFreecellData.h" 00013 #include "FCSFreecellAlgorithm.h" 00014 00016 class FCSSimpleSimonSolvingAlgorithm : public FCSFreecellData, public FCSFreecellAlgorithm 00017 { 00018 public: 00025 static FCSSimpleSimonSolvingAlgorithm* Create(FCCommandLineArguments* CommandLine); 00026 00028 virtual ~FCSSimpleSimonSolvingAlgorithm(); 00029 00030 protected: 00032 FCSSimpleSimonSolvingAlgorithm(); 00033 00035 FCSSimpleSimonSolvingAlgorithm(FCCommandLineArguments* CommandLine); 00036 00046 virtual FCSStateSolvingReturnCodes RunTest(int TestNumber, FCSStateWithLocations* StateWithLocations, 00047 int Depth, int NumberOfFreeStacks, 00048 int NumberOfFreecells, 00049 FCSDerivedStatesList* DerivedStateList); 00050 00057 inline bool IsSimpleSimonTrueParent(FCSCard* Parent, FCSCard* Child); 00058 00065 inline bool IsSimpleSimonTrueParentSuit(FCSCard* Parent, FCSCard* Child); 00066 00073 inline bool IsSimpleSimonFalseParent(FCSCard* Parent, FCSCard* Child); 00074 00083 FCSStateSolvingReturnCodes MoveSequenceToFounds(FCSStateWithLocations* StateWithLocations, 00084 int Depth, 00085 int NumberOfFreeStacks, 00086 int NumberOfFreecells, 00087 FCSDerivedStatesList* DerivedStateList); 00088 00097 FCSStateSolvingReturnCodes MoveSequenceToTrueParent(FCSStateWithLocations* StateWithLocations, 00098 int Depth, 00099 int NumberOfFreeStacks, 00100 int NumberOfFreecells, 00101 FCSDerivedStatesList* DerivedStateList); 00102 00111 FCSStateSolvingReturnCodes MoveWholeStackSequenceToFalseParent(FCSStateWithLocations* StateWithLocations, 00112 int Depth, 00113 int NumberOfFreeStacks, 00114 int NumberOfFreecells, 00115 FCSDerivedStatesList* DerivedStateList); 00116 00126 FCSStateSolvingReturnCodes MoveSequenceToTrueParentWithSomeCardsAbove(FCSStateWithLocations* StateWithLocations, 00127 int Depth, 00128 int NumberOfFreeStacks, 00129 int NumberOfFreecells, 00130 FCSDerivedStatesList* DerivedStateList); 00131 00141 FCSStateSolvingReturnCodes MoveSequenceWithSomeCardsAboveToTrueParent(FCSStateWithLocations* StateWithLocations, 00142 int Depth, 00143 int NumberOfFreeStacks, 00144 int NumberOfFreecells, 00145 FCSDerivedStatesList* DerivedStateList); 00146 00156 FCSStateSolvingReturnCodes MoveSequenceWithJunkSequenceAboveToTrueParentWithSomeCardsAbove(FCSStateWithLocations* StateWithLocations, 00157 int Depth, 00158 int NumberOfFreeStacks, 00159 int NumberOfFreecells, 00160 FCSDerivedStatesList* DerivedStateList); 00161 00171 FCSStateSolvingReturnCodes MoveWholeStackSequenceToFalseParentWithSomeCardsAbove(FCSStateWithLocations* StateWithLocations, 00172 int Depth, 00173 int NumberOfFreeStacks, 00174 int NumberOfFreecells, 00175 FCSDerivedStatesList* DerivedStateList); 00176 00185 FCSStateSolvingReturnCodes MoveSequenceToParentOnTheSameStack(FCSStateWithLocations* StateWithLocations, 00186 int Depth, 00187 int NumberOfFreeStacks, 00188 int NumberOfFreecells, 00189 FCSDerivedStatesList* DerivedStateList); 00190 00199 FCSStateSolvingReturnCodes MoveSequenceToFalseParent(FCSStateWithLocations* StateWithLocations, 00200 int Depth, 00201 int NumberOfFreeStacks, 00202 int NumberOfFreecells, 00203 FCSDerivedStatesList* DerivedStateList); 00204 00205 }; 00206 00207 #endif