-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchessborad.h
47 lines (46 loc) · 1.22 KB
/
chessborad.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
#ifndef CHESSBORAD_H
#define CHESSBORAD_H
#include <caculate.h>
#include <chessman.h>
#include <gogal.h>
#include <QMessageBox>
#include <QStack>
class chessBorad
{
private:
QStack<int> recordBorad;
QStack<int> recordColor;
QStack<QString> AiRecordBorad;
public:
int borad[(CHESS_X_NUM-1)*CHESS_Y_NUM+(CHESS_Y_NUM-1)*CHESS_X_NUM+1];
int box[(CHESS_X_NUM-1)*(CHESS_Y_NUM-1)];
int recordRedBox[(CHESS_X_NUM-1)*(CHESS_Y_NUM-1)];
int recordBlueBox[(CHESS_X_NUM-1)*(CHESS_Y_NUM-1)];
int redBoxMark;
int blueBoxMark;
int boxOfSide[(CHESS_X_NUM-1)*(CHESS_Y_NUM-1)][4];
int color=1;
chessBorad();
int getColor();
int changeColor();
void inition();
int getFristLine(int box);
int getSecondLine(int box);
bool checkBoxs(int index);
bool checkBoxs(int index,int fillColor);
bool downHere(int index);
void setBorad(int index,int role);
int getRole(int index);
int getBoxRole(int box);
bool isEnd();
int whoWin();
int getRedCount();
int getBlueCount();
int backBorad();
int getRedBoxMark(int box);
int getBlueBoxMark(int box);
void refreshBoxs();
int * getBorad();
void copyDate(chessBorad * temp);
};
#endif // CHESSBORAD_H