Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FCSStateWithLocations Class Reference

Abstract class representing a state in a card game with additional data to process and store it.

#include <FCState.h>

Inheritance diagram for FCSStateWithLocations:

FCSTalonStateWithLocations FCSCompactStateWithLocations< FCSTalonStateWithLocations > FCSDebugStateWithLocations< FCSTalonStateWithLocations > FCSIndirectStateWithLocations< FCSTalonStateWithLocations > FCSIndirectTalonStateWithLocations List of all members.

Public Member Functions

virtual ~FCSStateWithLocations ()
 Destructor.
virtual void Copy (FCSStateWithLocations *State)
 Copy StateWithLocations object.
virtual int Compare (const FCSStateWithLocations *State)=0
 Compare a FCSStateWithLocations to another.
virtual void StateAsString (char *String, FCSDebugDisplayInfo *DebugInfo)
 Represent a FCSStateWithLocations object as a string.
virtual int CheckStateValidity (int NumberOfFreecells, int NumberOfStacks, int NumberOfDecks, FCSCard **MisplacedCard, FCSTalonType TalonType)
 Validiate that this state is valid.
virtual FCSCardGetStackCard (int Stack, int Card)=0
 Get a card from the state.
virtual char GetStackCardSuit (int Stack, int Card)=0
 Get a suit from a card in the state.
virtual char GetStackCardNumber (int Stack, int Card)=0
 Get a card number from a card in the state.
virtual int GetStackLength (int Stack)=0
 Get the number of cards in the stack.
virtual FCSCardGetFreecellCard (int Freecell)=0
 Get a freecell card from the state.
virtual char GetFreecellCardSuit (int Freecell)=0
 Get a suit from a freecell card in the state.
virtual char GetFreecellCardNumber (int Freecell)=0
 Get a card number from a freecell card in the state.
virtual char GetFoundation (int Foundation)=0
 Get a card number from a foundation in the state.
virtual void IncrementFoundation (int Foundation)=0
 Add the next card to a foundation in the state.
virtual void SetFoundation (int Foundation, char Value)=0
 Put a card into a foundation in the state.
virtual void PopStackCard (int Stack, FCSCard *Card)=0
 Take a card off a stack in the state.
virtual void PushStackCardIntoStack (int DestStack, int SrcStack, int SrcCard)=0
 Move a card from one stack to another.
virtual void PushCardIntoStack (int DestStack, FCSCard *Card)=0
 Move a card onto a stack.
virtual void PutCardInFreecell (int Freecell, FCSCard *Card)=0
 Move a card onto a freecll.
virtual void EmptyFreecell (int Freecell)=0
 Clear a freecell.
virtual void FlipStackCard (int Stack, int Card)=0
 Make a stack card flipped over (visible).
virtual void CleanState ()
 Clear the state of data.
virtual void CacheStacks (AFCSGenericStackStorage *Storage, int StackNumber)
 Cache the stacks of the state.
virtual void Initialize (int NumberOfStacks)
 Initialize the state of stacks (and talons if applicable).
virtual void CanonizeState (int NumberOfFreecells, int NumberOfStacks)=0
 Canonize the state - put it into the internal representation.
virtual FCSStateGetState ()=0
 Get a pointer to the state.

Static Public Member Functions

static FCSStateWithLocationsCreateInitialState (const char *String, int NumberOfFreecells, int NumberOfStacks, int NumberOfDecks)
 Convert a string representation of a state into a FCSStateWithLocations object.

Public Attributes

FCSStateWithLocationsm_Parent
 State of game before this state.
FCSMoveStackm_MovesToParent
 How to arrive at this state from parent.
int m_Depth
 Number of states in the path to this state.
int m_Visited
 How this state has been visited.
int m_VisitIterations
 Number of states looked through so far.
char m_StackLocations [MAX_NUM_STACKS]
 Canonized location of the stacks of cards.
char m_FreecellLocations [MAX_NUM_FREECELLS]
 Canonized location of the freecell cards.

Protected Member Functions

 FCSStateWithLocations ()
 Constructor.

Detailed Description

Definition at line 42 of file FCState.h.


Member Function Documentation

void FCSStateWithLocations::CacheStacks AFCSGenericStackStorage Storage,
int  StackNumber
[virtual]
 

This is only implemented in the indirect state classes

Reimplemented in FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Definition at line 510 of file FCState.cpp.

Referenced by FCSTalonSolvingAlgorithm::CheckAndAddState(), and FCSFreecellData::CheckAndAddState().

virtual void FCSStateWithLocations::CanonizeState int  NumberOfFreecells,
int  NumberOfStacks
[pure virtual]
 

Parameters:
NumberOfFreecells is the number of freecells in the card game
NumberOfStacks is the number of stacks in the card game

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSTalonSolvingAlgorithm::CheckAndAddState(), FCSFreecellData::CheckAndAddState(), main(), and TestEachGame().

int FCSStateWithLocations::CheckStateValidity int  NumberOfFreecells,
int  NumberOfStacks,
int  NumberOfDecks,
FCSCard **  MisplacedCard,
FCSTalonType  TalonType
[virtual]
 

Parameters:
NumberOfFreecells is the number of freecells in the card game
NumberOfStacks is the number of stacks in the card game
NumberOfDecks is the number of decks in the card game
MisplacedCard will contain a misplaced card if there is one
TalonType is the talon type of the game if applicable
Returns:
Returns 0 if state is valid, non-zero if state is invalid

Reimplemented in FCSTalonStateWithLocations.

Definition at line 278 of file FCState.cpp.

References FCSCard::Create(), GetFoundation(), GetFreecellCardNumber(), GetFreecellCardSuit(), GetStackCardNumber(), GetStackCardSuit(), and GetStackLength().

Referenced by FCSDebugDisplayInfo::Display(), and FCCommandLineArguments::Verify().

virtual int FCSStateWithLocations::Compare const FCSStateWithLocations State  )  [pure virtual]
 

Parameters:
State to be compared to
Returns:
-1 if this FCSStateWithLocations < State, 1 if FCSStateWithLocations > State, 0 if FCSStateWithLocations = State

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

void FCSStateWithLocations::Copy FCSStateWithLocations State  )  [virtual]
 

Parameters:
State is the StateWithLocations to be copied

Reimplemented in FCSIndirectTalonStateWithLocations, FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Definition at line 73 of file FCState.cpp.

References m_Depth, m_FreecellLocations, m_MovesToParent, m_Parent, m_StackLocations, m_Visited, and m_VisitIterations.

Referenced by main(), FCSMoveStack::Normalize(), TestEachGame(), and FCSFreecellData::TraceSolution().

FCSStateWithLocations * FCSStateWithLocations::CreateInitialState const char *  String,
int  NumberOfFreecells,
int  NumberOfStacks,
int  NumberOfDecks
[static]
 

Parameters:
String is the string to be converted
NumberOfFreecells is the number of freecells in the card game
NumberOfStacks is the number of stacks in the card game
NumberOfDecks is the number of decks in the card game
Returns:
A pointer to the newly created FCSStateWithLocations object

Definition at line 84 of file FCState.cpp.

References FCSCard::Create(), CreateStateWithLocations(), FCSCard::EmptyCard(), EmptyFreecell(), FoundationsPrefixes, FreecellsPrefixes, Initialize(), PushCardIntoStack(), PutCardInFreecell(), SetFoundation(), FCSCard::User2Perl(), FCSCard::User2PerlCardNumber(), and FCSCard::User2PerlSuit().

Referenced by CreateInitialState().

virtual void FCSStateWithLocations::EmptyFreecell int  Freecell  )  [pure virtual]
 

Parameters:
Freecell to be cleared

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSTalonStateWithLocations::CreateInitialState(), CreateInitialState(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToEmptyStack(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToTopOfStacks(), and FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack().

virtual void FCSStateWithLocations::FlipStackCard int  Stack,
int  Card
[pure virtual]
 

Parameters:
Stack the card is in
Card is the position of the card

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove().

virtual char FCSStateWithLocations::GetFoundation int  Foundation  )  [pure virtual]
 

Parameters:
Foundation the card is in
Returns:
The card's number

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::AStarRateState(), FCSTalonStateWithLocations::CheckStateValidity(), CheckStateValidity(), FCSTalonSolvingAlgorithm::GetCardFromKlondikeTalon(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveTopStackCardsToFounds(), FCSTalonStateWithLocations::StateAsString(), and StateAsString().

virtual FCSCard* FCSStateWithLocations::GetFreecellCard int  Freecell  )  [pure virtual]
 

Parameters:
Freecell the card is in
Returns:
A pointer to the card

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToEmptyStack(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToTopOfStacks(), FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack(), FCSTalonStateWithLocations::StateAsString(), and StateAsString().

virtual char FCSStateWithLocations::GetFreecellCardNumber int  Freecell  )  [pure virtual]
 

Parameters:
Freecell the card is in
Returns:
The card's number

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::AStarRateState(), FCSTalonStateWithLocations::CheckStateValidity(), CheckStateValidity(), FCSFreecellSolvingAlgorithm::EmptyStackIntoFreecells(), FCSFreecellSolvingAlgorithm::MoveCardsToADifferentParent(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToTopOfStacks(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks(), FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack(), FCSFreecellSolvingAlgorithm::MoveStackCardsToDifferentStacks(), FCSBFSSolvingAlgorithm< SolvingAlgorithmType >::Resume(), FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::Resume(), FCSOptimizeSolvingAlgorithm< SolvingAlgorithmType >::Solve(), FCSDFSSolvingAlgorithm< SolvingAlgorithmType >::Solve(), FCSBFSSolvingAlgorithm< SolvingAlgorithmType >::Solve(), FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::Solve(), FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::SolveOrResume(), and FCSRandomDFSSolvingAlgorithm< SolvingAlgorithmType >::SolveOrResume().

virtual char FCSStateWithLocations::GetFreecellCardSuit int  Freecell  )  [pure virtual]
 

Parameters:
Freecell the card is in
Returns:
The card's suit

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by FCSTalonStateWithLocations::CheckStateValidity(), and CheckStateValidity().

virtual FCSCard* FCSStateWithLocations::GetStackCard int  Stack,
int  Card
[pure virtual]
 

Parameters:
Stack the card is in
Card is the position of the card
Returns:
A pointer to the card

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::AStarRateState(), FCSFreecellSolvingAlgorithm::FlipTopCard(), FCSTalonSolvingAlgorithm::GetCardFromKlondikeTalon(), FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::InitAStar(), FCSFreecellSolvingAlgorithm::MoveCardsToADifferentParent(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToTopOfStacks(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToFalseParent(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToFounds(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToParentOnTheSameStack(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToTrueParent(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToTrueParentWithSomeCardsAbove(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceWithJunkSequenceAboveToTrueParentWithSomeCardsAbove(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceWithSomeCardsAboveToTrueParent(), FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack(), FCSFreecellSolvingAlgorithm::MoveStackCardsToDifferentStacks(), FCSFreecellSolvingAlgorithm::MoveTopStackCardsToFounds(), FCSSimpleSimonSolvingAlgorithm::MoveWholeStackSequenceToFalseParent(), FCSSimpleSimonSolvingAlgorithm::MoveWholeStackSequenceToFalseParentWithSomeCardsAbove(), FCSTalonStateWithLocations::StateAsString(), and StateAsString().

virtual char FCSStateWithLocations::GetStackCardNumber int  Stack,
int  Card
[pure virtual]
 

Parameters:
Stack the card is in
Card is the position of the card
Returns:
The card's number

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by FCSTalonStateWithLocations::CheckStateValidity(), CheckStateValidity(), and FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks().

virtual char FCSStateWithLocations::GetStackCardSuit int  Stack,
int  Card
[pure virtual]
 

Parameters:
Stack the card is in
Card is the position of the card
Returns:
The card's suit

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by FCSTalonStateWithLocations::CheckStateValidity(), and CheckStateValidity().

virtual int FCSStateWithLocations::GetStackLength int  Stack  )  [pure virtual]
 

Parameters:
Stack is the stack to get the length from
Returns:
The number of cards in the stack

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::AStarRateState(), FCSTalonStateWithLocations::CheckStateValidity(), CheckStateValidity(), FCSFreecellSolvingAlgorithm::EmptyStackIntoFreecells(), FCSFreecellSolvingAlgorithm::FlipTopCard(), FCSTalonSolvingAlgorithm::GetCardFromKlondikeTalon(), FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::InitAStar(), FCSFreecellSolvingAlgorithm::MoveCardsToADifferentParent(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToEmptyStack(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToTopOfStacks(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToFalseParent(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToFounds(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToParentOnTheSameStack(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToTrueParent(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToTrueParentWithSomeCardsAbove(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceWithJunkSequenceAboveToTrueParentWithSomeCardsAbove(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceWithSomeCardsAboveToTrueParent(), FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack(), FCSFreecellSolvingAlgorithm::MoveStackCardsToDifferentStacks(), FCSFreecellSolvingAlgorithm::MoveTopStackCardsToFounds(), FCSSimpleSimonSolvingAlgorithm::MoveWholeStackSequenceToFalseParent(), FCSSimpleSimonSolvingAlgorithm::MoveWholeStackSequenceToFalseParentWithSomeCardsAbove(), FCSBFSSolvingAlgorithm< SolvingAlgorithmType >::Resume(), FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::Resume(), FCSOptimizeSolvingAlgorithm< SolvingAlgorithmType >::Solve(), FCSDFSSolvingAlgorithm< SolvingAlgorithmType >::Solve(), FCSBFSSolvingAlgorithm< SolvingAlgorithmType >::Solve(), FCSAStarSolvingAlgorithm< SolvingAlgorithmType >::Solve(), FCSSoftDFSSolvingAlgorithm< SolvingAlgorithmType >::SolveOrResume(), FCSRandomDFSSolvingAlgorithm< SolvingAlgorithmType >::SolveOrResume(), FCSTalonStateWithLocations::StateAsString(), and StateAsString().

virtual FCSState* FCSStateWithLocations::GetState  )  [pure virtual]
 

Returns:
A pointer to the state at this location

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

virtual void FCSStateWithLocations::IncrementFoundation int  Foundation  )  [pure virtual]
 

Parameters:
Foundation the card is in

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSTalonSolvingAlgorithm::GetCardFromKlondikeTalon(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToFounds(), and FCSFreecellSolvingAlgorithm::MoveTopStackCardsToFounds().

virtual void FCSStateWithLocations::PopStackCard int  Stack,
FCSCard Card
[pure virtual]
 

Parameters:
Stack the card is in
Card a pointer to the card being removed

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSFreecellSolvingAlgorithm::EmptyStackIntoFreecells(), FCSFreecellSolvingAlgorithm::MoveCardsToADifferentParent(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToTopOfStacks(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSFreecellData::MoveSequence(), FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks(), FCSSimpleSimonSolvingAlgorithm::MoveSequenceToFounds(), FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack(), FCSFreecellSolvingAlgorithm::MoveStackCardsToDifferentStacks(), and FCSFreecellSolvingAlgorithm::MoveTopStackCardsToFounds().

virtual void FCSStateWithLocations::PushCardIntoStack int  DestStack,
FCSCard Card
[pure virtual]
 

Parameters:
DestStack is the stack the card is going to
Card a pointer to the card being added

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSTalonStateWithLocations::CreateInitialState(), CreateInitialState(), FCSTalonSolvingAlgorithm::GetCardFromKlondikeTalon(), FCSFreecellSolvingAlgorithm::MoveCardsToADifferentParent(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToEmptyStack(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToTopOfStacks(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks(), FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack(), and FCSFreecellSolvingAlgorithm::MoveStackCardsToDifferentStacks().

virtual void FCSStateWithLocations::PushStackCardIntoStack int  DestStack,
int  SrcStack,
int  SrcCard
[pure virtual]
 

Parameters:
DestStack is the stack the card is going to
SrcStack is the stack the card is coming from
SrcCard is the position of the card in the source stack

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSFreecellSolvingAlgorithm::MoveCardsToADifferentParent(), FCSFreecellData::MoveSequence(), FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks(), and FCSFreecellSolvingAlgorithm::MoveStackCardsToDifferentStacks().

virtual void FCSStateWithLocations::PutCardInFreecell int  Freecell,
FCSCard Card
[pure virtual]
 

Parameters:
Freecell the card is going to be put in
Card a pointer to the card being added

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by ApplyMove(), FCSTalonStateWithLocations::CreateInitialState(), CreateInitialState(), FCSFreecellSolvingAlgorithm::EmptyStackIntoFreecells(), FCSFreecellSolvingAlgorithm::MoveCardsToADifferentParent(), FCSFreecellSolvingAlgorithm::MoveFreecellCardsToTopOfStacks(), FCSFreecellSolvingAlgorithm::MoveNonTopStackCardsToFounds(), FCSFreecellSolvingAlgorithm::MoveSequencesToFreeStacks(), FCSFreecellSolvingAlgorithm::MoveStackCardsToAParentOnTheSameStack(), and FCSFreecellSolvingAlgorithm::MoveStackCardsToDifferentStacks().

virtual void FCSStateWithLocations::SetFoundation int  Foundation,
char  Value
[pure virtual]
 

Parameters:
Foundation the card is in
Value is the card number

Implemented in FCSCompactStateWithLocations< FCSTalonStateWithLocations >, FCSDebugStateWithLocations< FCSTalonStateWithLocations >, FCSIndirectStateWithLocations< FCSTalonStateWithLocations >, and FCSIndirectStateWithLocations< FCSStateWithLocations >.

Referenced by FCSTalonStateWithLocations::CreateInitialState(), and CreateInitialState().

void FCSStateWithLocations::StateAsString char *  String,
FCSDebugDisplayInfo DebugInfo
[virtual]
 

Parameters:
DebugInfo contains debug information that can be included in the string
String is the pointer to the string

Reimplemented in FCSTalonStateWithLocations.

Definition at line 332 of file FCState.cpp.

References DEBUG_CANONIZED_ORDER_OUTPUT, DEBUG_DISPLAY_10_AS_T, DEBUG_IS_OUTPUT_PARSEABLE, GetFoundation(), GetFreecellCard(), GetStackCard(), GetStackLength(), FCSDebugDisplayInfo::m_DisplayDebug, FCSDebugDisplayInfo::m_DisplayDebugOptions, m_FreecellLocations, FCSDebugDisplayInfo::m_NumberOfDecks, FCSDebugDisplayInfo::m_NumberOfFreecells, FCSDebugDisplayInfo::m_NumberOfStacks, m_StackLocations, min, FCSCard::Perl2User(), and FCSCard::Perl2UserCardNumber().

Referenced by FCSDebugDisplayInfo::Display(), and FCSFreecellData::ShowSolution().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 11:20:17 2005 for Cpp Freecell Solver by  doxygen 1.4.4