00001 // --------------------------------------------------------------------------- 00002 // PLATFORM: All - 00003 // PRODUCT: Fourplay - 00004 // VISIBILITY: Public - 00005 // --------------------------------------------------------------------------- 00006 // - 00007 // PURPOSE: Column which will make up the grid. - 00008 // - 00009 // --------------------------------------------------------------------------- 00010 00011 #ifndef GRIDCOLUMN_H 00012 #define GRIDCOLUMN_H 00013 00014 #include "GameConstants.h" 00015 #include "GridSquare.h" 00016 00021 class GridColumn 00022 { 00023 public: 00027 GridColumn() {} 00028 00034 GridColumn(CIwFVec2 position, 00035 int tileSize); 00036 00040 ~GridColumn(); 00041 00045 void Draw(); 00046 00051 bool IsFull(); 00052 00057 void SetFull(bool toggle); 00058 00063 int GetNextEmpty(); 00064 00068 void DecreaseNextEmpty(); 00069 00075 GridSquare* GetSquare(int index); 00076 00080 void ClearColumn(); 00081 00082 protected: 00084 CIwFVec2 m_position; 00085 00087 static const int m_numRows = 6; 00088 00090 static const int m_numSquares = 5; 00091 00093 GridSquare *m_squares[m_numRows]; 00094 00096 int m_emptySquares; 00097 00099 bool m_isFull; 00100 }; 00101 00102 #endif