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

FCCompactState.h

Go to the documentation of this file.
00001 #ifndef MMANN_COMPACT_STATE_H
00002 #define MMANN_COMPACT_STATE_H
00003 
00011 
00012 #include "FCState.h"
00013 #include "FCTalonState.h"
00014 
00015 template <class StateWithLocation> 
00016 class FCSCompactStateWithLocations;
00017 
00018 /*
00019  * Card:
00020  * Bits 0-3 - Card Number
00021  * Bits 4-5 - Suit
00022  * 
00023  */
00024 
00025 
00027 class FCSCompactCard : public FCSCard
00028 {
00029 public:
00033     //classes currently created by the template
00034     friend FCSCompactStateWithLocations<FCSTalonStateWithLocations>;
00035 
00039     //classes currently created by the template
00040     friend FCSCompactStateWithLocations<FCSStateWithLocations>;
00041 
00043     FCSCompactCard();
00044 
00046     virtual ~FCSCompactCard();
00047 
00051     void Copy(FCSCard* Card);
00052 
00054     void EmptyCard();
00055 
00057     bool IsEmptyCard();
00058 
00062     char GetCardNumber();
00063 
00067     char GetSuit();
00068 
00072     char GetFlipped();
00073 
00077     void SetSuit(char Suit);
00078 
00082     void SetCardNumber(char CardNumber);
00083 
00087     void SetFlipped(char Flipped);
00088 
00092     int GetClassSize();
00093 
00094 private:
00096     char m_Card;
00097 };
00098 
00100 class FCSCompactState : public FCSState
00101 {
00102 public:
00106     int GetClassSize(); 
00107 
00113     int StackCompare(int StackPosition1, int StackPosition2);
00114 
00119     int Compare(FCSCompactState* State);
00120 
00122     FCSCompactCard m_Data[MAX_NUM_STACKS*(MAX_NUM_CARDS_IN_A_STACK+1)+MAX_NUM_FREECELLS+4*MAX_NUM_DECKS];
00123 };
00124 
00125 #endif

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