#ifndef __CELL_H__ #define __CELL_H__ #include "dir.h" class Cell { public: Cell(); bool isOpen( Dir dir ) { return (*this)[ dir ]; } void setOpen( Dir dir, bool b ) { (*this)[ dir ] = b; } bool isMarked() { return mark; } void setMark( bool b ) { mark = b; } bool inSameGroup( Cell& other ); void combineGroups( Cell& other ); private: Cell* getGroup(); bool& operator[]( Dir& dir ); bool mark; bool north_open; bool west_open; bool south_open; bool east_open; Cell *parent; }; #endif // __CELL_H__