#ifndef __LAB_HPP #define __LAB_HPP class Labyrinth { public: enum cellstatus_t { empty, full }; private: unsigned width,height; cellstatus_t *cell; Labyrinth& operator=(const Labyrinth&); Labyrinth(const Labyrinth&); public: Labyrinth(unsigned w, unsigned h) : height(h), width(w), cell(new cellstatus_t[width*height]) {} ~Labyrinth() { delete[] cell; } void setCell(unsigned x, unsigned y, cellstatus_t s) { cell[y*width+x] = s; } cellstatus_t queryCell(unsigned x, unsigned y) const { return cell[y*width+x]; } unsigned queryWidth() const { return width; } unsigned queryHeight() const { return height; } }; #endif