-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPiece.h
More file actions
36 lines (27 loc) · 665 Bytes
/
Piece.h
File metadata and controls
36 lines (27 loc) · 665 Bytes
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
28
29
30
31
32
33
34
35
36
#ifndef PIECE_H
#define PIECE_H
#include <QLabel>
#include <QPoint>
#include <QPixmap>
namespace Ui { class Piece;}
enum class Color{ WHITE=0, BLACK=1 };
class Piece : public QLabel
{
Q_OBJECT
public:
Piece()=delete;
//explicit Piece(QWidget* parent = nullptr);
explicit Piece(Color c = Color::WHITE, QWidget* parent = nullptr);
virtual ~Piece(){};
virtual void movePiece()=0;
// void setPoint(const unsigned& x,const unsigned& y);
bool isPlaced{true};
//friend Piece& operator = (){ return this};
Color color;
private:
Ui::Piece* ui;
protected:
QPixmap pieceIcon;
//QPoint point{};
};
#endif // PIECE_H