#ifndef BLOCK_H #define BLOCK_H #include "pixmapitem.h" #include "constants.h" #include class Block : public PixmapItem { public: enum Neighbour { None = 0, Left = (1 << 0), Right = (1 << 1), Up = (1 << 2), Down = (1 << 3) }; public: Block(Color::Color color, unsigned int neighbours = None, QGraphicsItem *parent = 0); virtual ~Block() {}; void setNeighbours(unsigned int neighbours); virtual bool checkEnter(Actor *actor) { Q_UNUSED(actor); return false; } // TODO: colored blocks private: // map for saving QPixmaps for reuse static QMap m_pixmaps; }; #endif // BLOCK_H