-
Notifications
You must be signed in to change notification settings - Fork 1
/
single_play.h
70 lines (44 loc) · 1.1 KB
/
single_play.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef SINGLE_PLAY_H
#define SINGLE_PLAY_H
#include "chessBoard.h"
#include <QMainWindow>
#include <QPropertyAnimation>
#include <QParallelAnimationGroup>
#include "cell_label.h"
namespace Ui {
class single_play;
}
class single_play : public QMainWindow {
Q_OBJECT
public:
explicit single_play(QWidget *parent = nullptr);
void refresh_board(chessboard *chessBoard);
~single_play();
signals:
void showmain();
private slots:
void on_gary1_clicked();
void on_gary2_clicked();
void on_gary3_clicked();
void on_green1_clicked();
void on_green2_clicked();
void on_green3_clicked();
void fresh();
void cells_clicked(int i, int j);
private:
Ui::single_play *ui;
chessboard *chessBoard;
QVector<QVector<cell_label *>> cells;
QParallelAnimationGroup *animationGroup;
stack<pair<point, char>> movedChess;
void refresh_text();
void initialize();
void action();
void step(int x, int y, int chesstype);
int turns;
int *num_chess;
int chesstype_gray;
int chesstype_green;
int camp;
};
#endif // SINGLE_PLAY_H