diff options
Diffstat (limited to 'pacman-c++/block.h')
| -rw-r--r-- | pacman-c++/block.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pacman-c++/block.h b/pacman-c++/block.h index 034a626..40bde51 100644 --- a/pacman-c++/block.h +++ b/pacman-c++/block.h | |||
| @@ -8,12 +8,20 @@ | |||
| 8 | class Block | 8 | class Block |
| 9 | : public PixmapItem | 9 | : public PixmapItem |
| 10 | { | 10 | { |
| 11 | enum Neighbour { | ||
| 12 | None = 0, | ||
| 13 | Left = (1 << 0), | ||
| 14 | Right = (1 << 1), | ||
| 15 | Up = (1 << 2), | ||
| 16 | Down = (1 << 3) | ||
| 17 | }; | ||
| 18 | |||
| 11 | public: | 19 | public: |
| 12 | Block(Color color, QGraphicsItem *parent=0); | 20 | Block(Color::Color color, Neighbour neighbour = None, QGraphicsItem *parent = 0); |
| 13 | 21 | ||
| 14 | private: | 22 | private: |
| 15 | // map for saving QPixmaps for reuse | 23 | // map for saving QPixmaps for reuse |
| 16 | static QMap<Color, QPixmap> m_pixmaps; | 24 | static QMap<Color::Color, QPixmap> m_pixmaps; |
| 17 | }; | 25 | }; |
| 18 | 26 | ||
| 19 | #endif // BLOCK_H | 27 | #endif // BLOCK_H |
