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

FCSDebugStateWithLocations< StateWithLocation > Class Template Reference

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

#include <FCSDebugStateWithLocations.h>

Inheritance diagram for FCSDebugStateWithLocations< StateWithLocation >:

FCSDebugTalonStateWithLocations List of all members.

Public Member Functions

 FCSDebugStateWithLocations ()
 Constructor.
virtual ~FCSDebugStateWithLocations ()
 Destructor.
virtual void Copy (FCSStateWithLocations *State)
 Copy FCSDebugStateWithLocations object.
int Compare (const FCSStateWithLocations *State)
 Compare a FCSDebugStateWithLocations to another.
FCSCardGetStackCard (int Stack, int Card)
 Get a card from the state.
char GetStackCardSuit (int Stack, int Card)
 Get a suit from a card in the state.
char GetStackCardNumber (int Stack, int Card)
 Get a card number from a card in the state.
int GetStackLength (int Stack)
 Get the number of cards in the stack.
FCSCardGetFreecellCard (int Freecell)
 Get a freecell card from the state.
char GetFreecellCardSuit (int Freecell)
 Get a suit from a freecell card in the state.
char GetFreecellCardNumber (int Freecell)
 Get a card number from a freecell card in the state.
char GetFoundation (int Foundation)
 Get a card number from a foundation in the state.
void IncrementFoundation (int Foundation)
 Add the next card to a foundation in the state.
void SetFoundation (int Foundation, char Value)
 Put a card into a foundation in the state.
void PopStackCard (int Stack, FCSCard *Card)
 Take a card off a stack in the state.
void PushStackCardIntoStack (int DestStack, int SrcStack, int SrcCard)
 Move a card from one stack to another.
void PushCardIntoStack (int DestStack, FCSCard *Card)
 Move a card onto a stack.
void PutCardInFreecell (int Freecell, FCSCard *Card)
 Move a card onto a freecll.
void EmptyFreecell (int Freecell)
 Clear a freecell.
void FlipStackCard (int Stack, int Card)
 Make a stack card flipped over (visible).
void CanonizeState (int NumberOfFreecells, int NumberOfStacks)
 Canonize the state - put it into the internal representation.
FCSStateGetState ()
 Get a pointer to the debug state.

Protected Attributes

FCSDebugState m_State
 State in debug form.

Detailed Description

template<class StateWithLocation>
class FCSDebugStateWithLocations< StateWithLocation >

Definition at line 17 of file FCSDebugStateWithLocations.h.


Member Function Documentation

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::CanonizeState int  NumberOfFreecells,
int  NumberOfStacks
 

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

Definition at line 279 of file FCSDebugStateWithLocations.h.

References FCSCard::Compare(), FCSDebugState::m_Freecells, FCSDebugState::m_Stacks, FCSDebugStateWithLocations< StateWithLocation >::m_State, and FCSDebugState::StackCompare().

template<class StateWithLocation>
int FCSDebugStateWithLocations< StateWithLocation >::Compare const FCSStateWithLocations State  ) 
 

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

Definition at line 171 of file FCSDebugStateWithLocations.h.

References FCSDebugState::Compare(), and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::Copy FCSStateWithLocations State  )  [virtual]
 

Parameters:
State is the FCSDebugStateWithLocations to be copied

Reimplemented in FCSDebugTalonStateWithLocations.

Definition at line 163 of file FCSDebugStateWithLocations.h.

References FCSDebugStateWithLocations< StateWithLocation >::m_State.

Referenced by FCSDebugTalonStateWithLocations::Copy().

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::EmptyFreecell int  Freecell  ) 
 

Parameters:
Freecell to be cleared

Definition at line 265 of file FCSDebugStateWithLocations.h.

References FCSDebugCard::m_CardNumber, FCSDebugCard::m_Flags, FCSDebugState::m_Freecells, FCSDebugStateWithLocations< StateWithLocation >::m_State, and FCSDebugCard::m_Suit.

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::FlipStackCard int  Stack,
int  Card
 

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

Definition at line 273 of file FCSDebugStateWithLocations.h.

References FCSDebugStack::m_Cards, FCSDebugState::m_Stacks, FCSDebugStateWithLocations< StateWithLocation >::m_State, and FCSDebugCard::SetFlipped().

template<class StateWithLocation>
char FCSDebugStateWithLocations< StateWithLocation >::GetFoundation int  Foundation  ) 
 

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

Definition at line 219 of file FCSDebugStateWithLocations.h.

References FCSDebugState::m_Foundations, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
FCSCard * FCSDebugStateWithLocations< StateWithLocation >::GetFreecellCard int  Freecell  ) 
 

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

Definition at line 201 of file FCSDebugStateWithLocations.h.

References FCSDebugState::m_Freecells, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
char FCSDebugStateWithLocations< StateWithLocation >::GetFreecellCardNumber int  Freecell  ) 
 

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

Definition at line 213 of file FCSDebugStateWithLocations.h.

References FCSDebugCard::GetCardNumber(), FCSDebugState::m_Freecells, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
char FCSDebugStateWithLocations< StateWithLocation >::GetFreecellCardSuit int  Freecell  ) 
 

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

Definition at line 207 of file FCSDebugStateWithLocations.h.

References FCSDebugCard::GetSuit(), FCSDebugState::m_Freecells, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
FCSCard * FCSDebugStateWithLocations< StateWithLocation >::GetStackCard int  Stack,
int  Card
 

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

Definition at line 177 of file FCSDebugStateWithLocations.h.

References FCSDebugStack::m_Cards, FCSDebugState::m_Stacks, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
char FCSDebugStateWithLocations< StateWithLocation >::GetStackCardNumber int  Stack,
int  Card
 

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

Definition at line 189 of file FCSDebugStateWithLocations.h.

References FCSDebugCard::GetCardNumber(), FCSDebugStack::m_Cards, FCSDebugState::m_Stacks, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
char FCSDebugStateWithLocations< StateWithLocation >::GetStackCardSuit int  Stack,
int  Card
 

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

Definition at line 183 of file FCSDebugStateWithLocations.h.

References FCSDebugCard::GetSuit(), FCSDebugStack::m_Cards, FCSDebugState::m_Stacks, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
int FCSDebugStateWithLocations< StateWithLocation >::GetStackLength int  Stack  ) 
 

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

Definition at line 195 of file FCSDebugStateWithLocations.h.

References FCSDebugStack::m_NumberOfCards, FCSDebugState::m_Stacks, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
FCSState * FCSDebugStateWithLocations< StateWithLocation >::GetState  ) 
 

Returns:
A pointer to the debug state at this location

Definition at line 325 of file FCSDebugStateWithLocations.h.

References FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::IncrementFoundation int  Foundation  ) 
 

Parameters:
Foundation the card is in

Definition at line 225 of file FCSDebugStateWithLocations.h.

References FCSDebugState::m_Foundations, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::PopStackCard int  Stack,
FCSCard Card
 

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

Definition at line 237 of file FCSDebugStateWithLocations.h.

References FCSCard::Copy(), FCSDebugCard::EmptyCard(), FCSDebugStack::m_Cards, FCSDebugStack::m_NumberOfCards, FCSDebugState::m_Stacks, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::PushCardIntoStack int  DestStack,
FCSCard Card
 

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

Definition at line 252 of file FCSDebugStateWithLocations.h.

References FCSDebugCard::Copy(), FCSDebugStack::m_Cards, FCSDebugStack::m_NumberOfCards, FCSDebugState::m_Stacks, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::PushStackCardIntoStack int  DestStack,
int  SrcStack,
int  SrcCard
 

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

Definition at line 245 of file FCSDebugStateWithLocations.h.

References FCSDebugCard::Copy(), FCSDebugStack::m_Cards, FCSDebugStack::m_NumberOfCards, FCSDebugState::m_Stacks, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::PutCardInFreecell int  Freecell,
FCSCard Card
 

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

Definition at line 259 of file FCSDebugStateWithLocations.h.

References FCSDebugCard::Copy(), FCSDebugState::m_Freecells, and FCSDebugStateWithLocations< StateWithLocation >::m_State.

template<class StateWithLocation>
void FCSDebugStateWithLocations< StateWithLocation >::SetFoundation int  Foundation,
char  Value
 

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

Definition at line 231 of file FCSDebugStateWithLocations.h.

References FCSDebugState::m_Foundations, and FCSDebugStateWithLocations< StateWithLocation >::m_State.


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