-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stone.h
33 lines (30 loc) · 811 Bytes
/
Stone.h
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
#ifndef STONE_H
#define STONE_H
#include <QColor>
#include <QPen>
enum Type{black,white,pending,empty,error};
class Stone{
public:
Stone(int x,int y,int rowInd,int colInd,Type t);
QColor getStoneColor()const{return stoneColor_;};
QColor getTextColor()const{return textColor_;};
Type getType()const{return type_;};
int x()const{return x_;};
int y()const{return y_;};
int id()const{return id_;};
int rowInd()const{return rowInd_;};
int colInd()const{return colInd_;};
static void clear(){nums_ = 0;};
private:
int x_;
int y_;
int id_;
int colInd_;
int rowInd_;
static int nums_;
Type type_;
QColor stoneColor_;
QColor textColor_;
QPen pen_;
};
#endif // STONE_H