summaryrefslogtreecommitdiffstats
path: root/pacman-c++/block.h
blob: 40bde5190cf69e537904a1bd32030e937930532c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef BLOCK_H
#define BLOCK_H

#include "pixmapitem.h"
#include "constants.h"
#include <QMap>

class Block
  : public PixmapItem
{
  enum Neighbour {
    None  = 0,
    Left  = (1 << 0),
    Right = (1 << 1),
    Up    = (1 << 2),
    Down  = (1 << 3)
  };

public:
  Block(Color::Color color, Neighbour neighbour = None, QGraphicsItem *parent = 0);

private:
  // map for saving QPixmaps for reuse
  static QMap<Color::Color, QPixmap> m_pixmaps;
};

#endif  // BLOCK_H