www.pudn.com > CHECKER.zip > STATEARY.H
/* Stateary.h */ #includeenum STATE { CELL_EMPTY=0, CELL_RED, CELL_BLACK, CELL_REDKING, CELL_BLACKKING }; typedef CArray CStateArray; class CStateArray2 : public CStateArray { protected: int maxx,maxy; public: CStateArray2(int mx,int my) { maxx=mx; maxy=my; SetSize(mx*my); }; STATE GetAt(int x,int y) { return CStateArray::GetAt(x*maxx+y); }; void SetAt(int x,int y,STATE v) { CStateArray::SetAt(x*maxx+y,v); }; void Serialize(CArchive &ar); };