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

FCState.h File Reference

This file contains the base freecell state classes. More...

#include "FCEnums.h"
#include "FCSMove.h"
#include "FCSCard.h"
#include "Config.h"
#include "FCSDebugDisplayInfo.h"
#include "HashAlgorithms.h"
#include "FCSStateWithLocationsMatrix.h"

Go to the source code of this file.

Classes

class  FCSState
 Abstract class representing a state in a card game. More...
class  FCSStateWithLocations
 Abstract class representing a state in a card game with additional data to process and store it. More...
class  FCSStateWithLocationsLinkedList
 A simple linked list class for FCSStateWithLocations. More...
class  MD5StateWithLocationsHashAlgorithm
 Hash algorithm specifically for FCSStateWithLocation classes. More...

Functions

int GetFCSStateWithLocationsClassSize ()
 Get the size of the child FCSStateWithLocations class.
FCSStateWithLocationsCreateStateWithLocations ()
 Create a FCSStateWithLocations object.
AFCSStateWithLocationsMatrixCreateStateWithLocationsMatrix (int Size)
 Create a AFCSStateWithLocationsMatrix object.
void ReallocStateWithLocationsArray (FCSStateWithLocations ***Array, int OldSize, int NewSize)
 Reallocate an array of FCSStateWithLocations pointers.
FCSStateWithLocationsCreateInitialState (const char *String, int NumberOfFreecells, int NumberOfStacks, int NumberOfDecks, FCSTalonType TalonType)
 Convert a string representation of a state into a FCSStateWithLocations object.

Variables

FCStateType GlobalStateType
 The state type currently being used by the solver.


Detailed Description

Author:
Michael Mann
Version:
1.0
Date:
August 2002

Definition in file FCState.h.


Function Documentation

FCSStateWithLocations* CreateInitialState const char *  String,
int  NumberOfFreecells,
int  NumberOfStacks,
int  NumberOfDecks,
FCSTalonType  TalonType
 

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
TalonType is the talon type for the card game (if applicable)
Returns:
A pointer to the newly created FCSStateWithLocations object

Definition at line 610 of file FCState.cpp.

References FCSTalonStateWithLocations::CreateInitialState(), and FCSStateWithLocations::CreateInitialState().

Referenced by FCCommandLineArguments::Verify().

FCSStateWithLocations* CreateStateWithLocations  ) 
 

Parameters:
NumberOfStacks is the number of stack in the state (used for indirect states)
Returns:
Pointer to the newly created FCSStateWithLocations object

Definition at line 539 of file FCState.cpp.

References GlobalStateType.

Referenced by FCSStateWithLocations::CreateInitialState(), FCSTalonStateWithLocations::CreateInitialState(), main(), FCSMoveStack::Normalize(), and TestEachGame().

AFCSStateWithLocationsMatrix* CreateStateWithLocationsMatrix int  Size  ) 
 

Parameters:
Size is the number of FCSStateWithLocations pointers to create
Returns:
Pointer to the newly created array

Definition at line 560 of file FCState.cpp.

References GlobalStateType.

Referenced by FCSFreecellData::FCSFreecellData(), FCSDFSSolvingAlgorithm< SolvingAlgorithmType >::Solve(), and FCSFreecellData::TraceSolution().

int GetFCSStateWithLocationsClassSize  ) 
 

Returns:
Size of the child FCSStateWithLocations class

Definition at line 518 of file FCState.cpp.

References GlobalStateType.

Referenced by FCSFreecellData::FCSFreecellData().

void ReallocStateWithLocationsArray FCSStateWithLocations ***  Array,
int  OldSize,
int  NewSize
 

The normal realloc was insufficient to handle this becuase of the different FCSStateWithLocations types

Parameters:
Array is a pointer to the FCSStateWithLocations pointer array that will be modified
OldSize is the old size of the array
NewSize is the new desired size of the array

Definition at line 581 of file FCState.cpp.

References GlobalStateType.

Referenced by FCSDerivedStatesList::AddState().


Generated on Sat Nov 5 11:20:16 2005 for Cpp Freecell Solver by  doxygen 1.4.4