#include <FCSTalonSolvingAlgorithm.h>
Inheritance diagram for FCSTalonSolvingAlgorithm:
Public Member Functions | |
FCSTalonSolvingAlgorithm (FCCommandLineArguments *CommandLine) | |
Constructor with command line interface. | |
virtual | ~FCSTalonSolvingAlgorithm () |
Destructor. | |
Static Public Member Functions | |
static FCSTalonSolvingAlgorithm * | Create (FCCommandLineArguments *CommandLine) |
Create a solving algorithm with CommandLine. | |
Protected Member Functions | |
FCSTalonSolvingAlgorithm () | |
Default constructor. | |
void | InitFCSTalonSolvingAlgorithm () |
The "real" default constructor. | |
virtual void | InitSolve (FCSStateWithLocations *InitState) |
Call this to initialize members needed for solve. (Common between all children). | |
virtual FCSStateSolvingReturnCodes | CheckAndAddState (FCSStateWithLocations *NewState, FCSStateWithLocations **ExistingState, int Depth) |
If the state is new state (not generated before), add it to storage. | |
virtual FCSStateSolvingReturnCodes | RunTest (int TestNumber, FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
Function to run each test on a state. | |
FCSStateSolvingReturnCodes | GetCardFromKlondikeTalon (FCSStateWithLocations *StateWithLocations, int Depth, int NumberOfFreeStacks, int NumberOfFreecells, FCSDerivedStatesList *DerivedStateList) |
This test moves a single cards from the talon to a stack. | |
Protected Attributes | |
FCSTalonType | m_TalonType |
Type of talon used for the game. | |
FCInternalHash< FCSTalonStateData, void > * | m_TalonsHash |
The Klondike Talons' Cache in Hash storage. | |
CompareFunctionCompareNodesAlgorithm< FCSTalonStateData, void > | m_TalonCompareFunction |
The compare function used for the Klondike Talons' Cache. | |
MD5TalonStateDataHashAlgorithm | m_TalonHashFunction |
The hash function used for the Klondike Talons' Cache. |
Definition at line 15 of file FCSTalonSolvingAlgorithm.h.
|
Reimplemented from FCSFreecellData. Definition at line 114 of file FCSTalonSolvingAlgorithm.cpp. References FCSStateWithLocations::CacheStacks(), FCSStateWithLocations::CanonizeState(), AFCSGenericStateStorage::CheckAndInsert(), FCSFreecellData::m_MaxDepth, FCSFreecellData::m_MaxNumberOfCheckedStates, FCSFreecellData::m_MaxNumberOfStatesInCollection, FCSFreecellData::m_NumberOfCheckedStates, FCSFreecellData::m_NumberOfFreecells, FCSFreecellData::m_NumberOfStacks, FCSFreecellData::m_NumberOfStatesInCollection, FCSFreecellData::m_StackStorage, FCSFreecellData::m_StateStorage, and m_TalonsHash. |
|
It is assumed that CommandLine has already been verified. This includes a valid start state
Reimplemented from FCSFreecellSolvingAlgorithm. Definition at line 43 of file FCSTalonSolvingAlgorithm.cpp. References FCCommandLineArguments::GetSolvingMethodType(). Referenced by MainCreate(). |
|
|
Reimplemented from FCSFreecellData. Definition at line 102 of file FCSTalonSolvingAlgorithm.cpp. References FCSFreecellData::InitSolve(), m_TalonCompareFunction, m_TalonHashFunction, m_TalonsHash, m_TalonType, and TALON_CACHE_SIZE. |
|
Reimplemented from FCSFreecellSolvingAlgorithm. Definition at line 69 of file FCSTalonSolvingAlgorithm.cpp. References GetCardFromKlondikeTalon(), FCSFreecellSolvingAlgorithm::MoveCardsToADifferentParent(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks(), FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack(), FCSFreecellSolvingAlgorithm::MoveStackCardsToDifferentStacks(), and FCSFreecellSolvingAlgorithm::MoveTopStackCardsToFounds(). |