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

FCSIndirectState Class Reference

Indirect representation of a state.

#include <FCIndirectState.h>

Inheritance diagram for FCSIndirectState:

FCSState List of all members.

Public Member Functions

 FCSIndirectState ()
 Constructor.
virtual ~FCSIndirectState ()
 Destructor.
int GetClassSize ()
 Get the size of FCSIndirectState class.
int StackCompare (int StackPosition1, int StackPosition2)
 Compare two cards on the stack.
int StackSortCompare (int StackPosition1, int StackPosition2)
 Compare two cards on the stack for only 1 deck of cards.
int Compare (FCSIndirectState *State)
 Compare two FCSIndirectStates.
void Copy (FCSIndirectState *State)
 Copy an indirect state into an indirect state.

Public Attributes

FCSIndirectCardm_Stacks [MAX_NUM_STACKS]
 Stacks of cards in the state.
FCSIndirectCard m_Freecells [MAX_NUM_FREECELLS]
 Freecells in the state.
char m_Foundations [MAX_NUM_DECKS *4]
 Foundations in the state.

Detailed Description

Definition at line 81 of file FCIndirectState.h.


Member Function Documentation

int FCSIndirectState::Compare FCSIndirectState State  ) 
 

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

Definition at line 129 of file FCIndirectState.cpp.

References FCSIndirectCard::m_Card, m_Foundations, m_Freecells, and m_Stacks.

Referenced by FCSIndirectStateWithLocations< StateWithLocation >::Compare().

void FCSIndirectState::Copy FCSIndirectState State  ) 
 

Parameters:
State is the indirect state to be copied

Definition at line 166 of file FCIndirectState.cpp.

References FCSIndirectCard::Copy(), m_Foundations, and m_Freecells.

Referenced by FCSIndirectStateWithLocations< StateWithLocation >::Copy().

int FCSIndirectState::GetClassSize  )  [virtual]
 

Returns:
Size of FCSIndirectState

Implements FCSState.

Definition at line 116 of file FCIndirectState.cpp.

int FCSIndirectState::StackCompare int  StackPosition1,
int  StackPosition2
 

Parameters:
StackPosition1 is the stack position of the first card
StackPosition2 is the stack position of the second card
Returns:
-1 if this card1 < card2, 1 if card1 > card2, 0 if card1 = Card2

Definition at line 86 of file FCIndirectState.cpp.

References FCSCard::Compare(), FCSIndirectCard::m_Card, m_Stacks, and min.

Referenced by FCSIndirectStateWithLocations< StateWithLocation >::CanonizeState().

int FCSIndirectState::StackSortCompare int  StackPosition1,
int  StackPosition2
 

Parameters:
StackPosition1 is the stack position of the first card
StackPosition2 is the stack position of the second card
Returns:
-1 if this card1 < card2, 1 if card1 > card2, 0 if card1 = Card2

Definition at line 121 of file FCIndirectState.cpp.

References FCSCard::Compare(), and m_Stacks.

Referenced by FCSIndirectStateWithLocations< StateWithLocation >::CanonizeState().


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