Using C++ and PDCurses
I'm working on binary space partitioning for dungeon generation. Every BSP node should point to its parent, sibling, and children, but I can't do the following.
class BSP
{
private:
BSP * m_parent, m_sibling, m_childA, m_childB;
int m_depth;
int m_x, m_y, m_width, m_height;
public:
BSP(void);
~BSP(void);
const BSP * const parent() const;
const BSP * const sibling() const;
const BSP * const childA() const;
const BSP * const childB() const;
int depth() const;
void depth(int depth);
int x() const;
void x(int x);
int y() const;
void y(int y);
int width() const;
void width(int width);
int height() const;
void height(int height);
};
BSP is being defined, so I can't have member variables that are pointers to BSP objects. What should I do about it?