-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchesspiece.h
More file actions
29 lines (25 loc) · 820 Bytes
/
chesspiece.h
File metadata and controls
29 lines (25 loc) · 820 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
#ifndef CHESSPIECE_H
#define CHESSPIECE_H
#include <QString>
#include <QPixmap>
#include <QDebug>
class chessPiece
{
public:
chessPiece(int player_number, char sign, QString name = ""); //!< Konstruktor klasy chessPiece
QPixmap getImage(); //!< Zwraca obrazek figury w postaci obiektu QPixmap
char getSign(); //!< Zwraca znak figury
QString getName(); //!< Zwraca słowną nazwę figury
int getPlayer(); //!< Zwraca numer gracza do którego należy figura
int getMoveNumber(); //!< Zwraca liczbę wykonanych ruchów figury
void nextMove(); //!< Zwiększa licznik wykonanych ruchów o 1
~chessPiece();
private:
char sign;
QString name;
QPixmap image;
QString image_url;
int moveNumber;
int player;
};
#endif // CHESSPIECE_H