00001 #ifndef FCS_COMPACT_MOVE_H 00002 #define FCS_COMPACT_MOVE_H 00003 00011 00012 #include "FCSMove.h" 00013 00015 #define FCS_MOVE_TYPE 0 00016 00017 #define FCS_MOVE_SRC 1 00018 00019 #define FCS_MOVE_DEST 2 00020 00021 #define FCS_MOVE_NUM_CARDS_IN_SEQ 3 00022 00023 #define FCS_MOVE_NUM_CARDS_FLIPPED 3 00024 00028 class FCSCompactMove : public FCSMove 00029 { 00030 public: 00032 FCSCompactMove(); 00033 00035 virtual ~FCSCompactMove(); 00036 00040 virtual void Copy(FCSMove* Move); 00041 00045 unsigned char GetSourceStack(); 00046 00050 unsigned char GetSourceFreecell(); 00051 00055 unsigned char GetDestStack(); 00056 00060 unsigned char GetDestFreecell(); 00061 00065 unsigned char GetFoundation(); 00066 00070 FCSMoveTypes GetType(); 00071 00075 unsigned char GetNumberOfCardsInSequence(); 00076 00080 unsigned char GetNumberOfCardsFlipped(); 00081 00085 void SetSourceStack(unsigned char StackNumber); 00086 00090 void SetSourceFreecell(unsigned char FreecellNumber); 00091 00095 void SetDestStack(unsigned char StackNumber); 00096 00100 void SetDestFreecell(unsigned char FreecellNumber); 00101 00105 void SetFoundation(unsigned char FoundationNumber); 00106 00110 void SetType(FCSMoveTypes MoveType); 00111 00115 void SetNumberOfCardsInSequence(unsigned char NumberOfCardsInSequence); 00116 00120 void SetNumberOfCardsFlipped(unsigned char NumberOfCardsFlipped); 00121 00122 protected: 00124 unsigned char m_Data[4]; 00125 }; 00126 00130 class FCSCompactMoveStack : public FCSMoveStack 00131 { 00132 public: 00134 FCSCompactMoveStack(); 00135 00137 virtual ~FCSCompactMoveStack(); 00138 00142 FCSMoveStack* Copy(); 00143 00147 void Push(FCSMove* Move); 00148 00153 int Pop(FCSMove** Move); 00154 00155 protected: 00157 FCSCompactMove* m_Moves; 00158 }; 00159 00160 00161 #endif 00162