#include <FCSSimpleSimonSolvingAlgorithm.h>
Inheritance diagram for FCSSimpleSimonSolvingAlgorithm:

Public Member Functions | |
| virtual | ~FCSSimpleSimonSolvingAlgorithm () |
| Destructor. | |
Static Public Member Functions | |
| static FCSSimpleSimonSolvingAlgorithm * | Create (FCCommandLineArguments *CommandLine) |
| Create a solving algorithm with CommandLine. | |
Protected Member Functions | |
| FCSSimpleSimonSolvingAlgorithm () | |
| Default constructor. | |
| FCSSimpleSimonSolvingAlgorithm (FCCommandLineArguments *CommandLine) | |
| Constructor with command line interface. | |
| virtual FCSStateSolvingReturnCodes | RunTest (int TestNumber, FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| Function to run each test on a state. | |
| bool | IsSimpleSimonTrueParent (FCSCard *Parent, FCSCard *Child) |
| Determines whether the above card is one greater in value than current card and is the same suit. | |
| bool | IsSimpleSimonTrueParentSuit (FCSCard *Parent, FCSCard *Child) |
| Determines whether or not two cards have the same suit. | |
| bool | IsSimpleSimonFalseParent (FCSCard *Parent, FCSCard *Child) |
| Determines whether the above card is one greater in value than current card. | |
| FCSStateSolvingReturnCodes | MoveSequenceToFounds (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a suit of freecell cards to its foundation. | |
| FCSStateSolvingReturnCodes | MoveSequenceToTrueParent (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a (group of) cards to its true parent (same suit). | |
| FCSStateSolvingReturnCodes | MoveWholeStackSequenceToFalseParent (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a stack of cards to its false parent (different suit). | |
| FCSStateSolvingReturnCodes | MoveSequenceToTrueParentWithSomeCardsAbove (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a (group of) cards to its true parent (same suit) when the parent isn't at the top of a stack. | |
| FCSStateSolvingReturnCodes | MoveSequenceWithSomeCardsAboveToTrueParent (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a (group of) cards that have unsequenced cards above to its true parent (same suit). | |
| FCSStateSolvingReturnCodes | MoveSequenceWithJunkSequenceAboveToTrueParentWithSomeCardsAbove (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a (group of) different suited cards to its true parent (same suit) when the parent isn't at the top of a stack. | |
| FCSStateSolvingReturnCodes | MoveWholeStackSequenceToFalseParentWithSomeCardsAbove (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a (group of) cards to its false parent (different suit) when the parent isn't at the top of a stack. | |
| FCSStateSolvingReturnCodes | MoveSequenceToParentOnTheSameStack (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a (group of) cards to its true parent (same suit) on the same stack. | |
| FCSStateSolvingReturnCodes | MoveSequenceToFalseParent (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
| This tests moves a (group of) card(s) to its false parent (different suit). | |
Definition at line 16 of file FCSSimpleSimonSolvingAlgorithm.h.
|
|
It is assumed that CommandLine has already been verified. This includes a valid start state
Definition at line 29 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCCommandLineArguments::GetSolvingMethodType(). Referenced by MainCreate(). |
|
||||||||||||
|
This was added for readability of the code
Definition at line 110 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSCard::GetCardNumber(). Referenced by IsSimpleSimonTrueParent(), MoveSequenceToFalseParent(), MoveSequenceToParentOnTheSameStack(), MoveSequenceToTrueParent(), MoveSequenceToTrueParentWithSomeCardsAbove(), MoveSequenceWithJunkSequenceAboveToTrueParentWithSomeCardsAbove(), MoveSequenceWithSomeCardsAboveToTrueParent(), MoveWholeStackSequenceToFalseParent(), and MoveWholeStackSequenceToFalseParentWithSomeCardsAbove(). |
|
||||||||||||
|
This was added for readability of the code
Definition at line 99 of file FCSSimpleSimonSolvingAlgorithm.cpp. References IsSimpleSimonFalseParent(), and IsSimpleSimonTrueParentSuit(). Referenced by MoveSequenceToFounds(), MoveSequenceToParentOnTheSameStack(), MoveSequenceToTrueParent(), MoveSequenceToTrueParentWithSomeCardsAbove(), MoveSequenceWithJunkSequenceAboveToTrueParentWithSomeCardsAbove(), and MoveSequenceWithSomeCardsAboveToTrueParent(). |
|
||||||||||||
|
This was added for readability of the code
Definition at line 105 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSCard::GetSuit(). Referenced by IsSimpleSimonTrueParent(), MoveSequenceToFalseParent(), MoveSequenceToParentOnTheSameStack(), MoveSequenceToTrueParent(), MoveSequenceToTrueParentWithSomeCardsAbove(), MoveSequenceWithJunkSequenceAboveToTrueParentWithSomeCardsAbove(), MoveSequenceWithSomeCardsAboveToTrueParent(), MoveWholeStackSequenceToFalseParent(), and MoveWholeStackSequenceToFalseParentWithSomeCardsAbove(). |
|
||||||||||||||||||||||||
|
Definition at line 1386 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CalculateMaxSequenceMoves(), FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), IsSimpleSimonFalseParent(), IsSimpleSimonTrueParentSuit(), FCSFreecellData::m_NumberOfStacks, and FCSFreecellData::MoveSequence(). Referenced by RunTest(). |
|
||||||||||||||||||||||||
|
Definition at line 115 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), FCSStateWithLocations::IncrementFoundation(), IsSimpleSimonTrueParent(), FCSFreecellData::m_NumberOfStacks, FCSStateWithLocations::PopStackCard(), FCSMoveStack::Push(), FCSMove::SetFoundation(), FCSMove::SetSourceStack(), and FCSMove::SetType(). Referenced by RunTest(). |
|
||||||||||||||||||||||||
|
Definition at line 1182 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CalculateMaxSequenceMoves(), FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), IsSimpleSimonFalseParent(), IsSimpleSimonTrueParent(), IsSimpleSimonTrueParentSuit(), FCSFreecellData::m_NumberOfStacks, and FCSFreecellData::MoveSequence(). Referenced by RunTest(). |
|
||||||||||||||||||||||||
|
Definition at line 182 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CalculateMaxSequenceMoves(), FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), IsSimpleSimonFalseParent(), IsSimpleSimonTrueParent(), IsSimpleSimonTrueParentSuit(), FCSFreecellData::m_NumberOfStacks, and FCSFreecellData::MoveSequence(). Referenced by RunTest(). |
|
||||||||||||||||||||||||
|
Definition at line 347 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CalculateMaxSequenceMoves(), FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), FCSCard::GetSuit(), IsSimpleSimonFalseParent(), IsSimpleSimonTrueParent(), IsSimpleSimonTrueParentSuit(), FCSFreecellData::m_NumberOfStacks, and FCSFreecellData::MoveSequence(). Referenced by RunTest(). |
|
||||||||||||||||||||||||
|
Definition at line 749 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CalculateMaxSequenceMoves(), FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), IsSimpleSimonFalseParent(), IsSimpleSimonTrueParent(), IsSimpleSimonTrueParentSuit(), FCSFreecellData::m_NumberOfStacks, and FCSFreecellData::MoveSequence(). Referenced by RunTest(). |
|
||||||||||||||||||||||||
|
Definition at line 566 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CalculateMaxSequenceMoves(), FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), FCSCard::GetSuit(), IsSimpleSimonFalseParent(), IsSimpleSimonTrueParent(), IsSimpleSimonTrueParentSuit(), FCSFreecellData::m_NumberOfStacks, and FCSFreecellData::MoveSequence(). Referenced by RunTest(). |
|
||||||||||||||||||||||||
|
Definition at line 265 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CalculateMaxSequenceMoves(), FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), IsSimpleSimonFalseParent(), IsSimpleSimonTrueParentSuit(), FCSFreecellData::m_NumberOfStacks, and FCSFreecellData::MoveSequence(). Referenced by RunTest(). |
|
||||||||||||||||||||||||
|
Definition at line 997 of file FCSSimpleSimonSolvingAlgorithm.cpp. References FCSFreecellData::CalculateMaxSequenceMoves(), FCSFreecellData::CheckStateBegin(), FCSFreecellData::CheckStateEnd(), FCSCard::Create(), FCSMove::Create(), CreateMoveStack(), FCSStateWithLocations::GetStackCard(), FCSStateWithLocations::GetStackLength(), IsSimpleSimonFalseParent(), IsSimpleSimonTrueParentSuit(), FCSFreecellData::m_NumberOfStacks, and FCSFreecellData::MoveSequence(). Referenced by RunTest(). |
|
||||||||||||||||||||||||||||
|
Implements FCSFreecellAlgorithm. Definition at line 60 of file FCSSimpleSimonSolvingAlgorithm.cpp. References MoveSequenceToFalseParent(), MoveSequenceToFounds(), MoveSequenceToParentOnTheSameStack(), MoveSequenceToTrueParent(), MoveSequenceToTrueParentWithSomeCardsAbove(), MoveSequenceWithJunkSequenceAboveToTrueParentWithSomeCardsAbove(), MoveSequenceWithSomeCardsAboveToTrueParent(), MoveWholeStackSequenceToFalseParent(), and MoveWholeStackSequenceToFalseParentWithSomeCardsAbove(). |
1.4.4