This repository has been archived by the owner on Mar 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
78 lines (66 loc) · 1.97 KB
/
mainwindow.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
71
72
73
74
75
76
77
78
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QProcess>
#include <QFile>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonValue>
#include <QJsonArray>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QMouseEvent>
#include <QMessageBox>
#include <QFileDialog>
#include <QDebug>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
bool career[5], playerGoods[4][12], playerState[4];
int playerCareer[4];
QStringList playerTable[4], playerHand[4];
void initGame();
void readTableJson();
QString readCardJson(QString);
void setTableStatus();
bool checkGameEnd();
protected:
virtual void mouseMoveEvent(QMouseEvent *);
virtual void mousePressEvent(QMouseEvent *);
private slots:
void receiveSettingData(QString, int);
void on_btn_adventurer_clicked();
void on_btn_builder_clicked();
void on_btn_councillor_clicked();
void on_btn_producer_clicked();
void on_btn_trader_clicked();
void on_btn_interaction_clicked();
void on_actionNew_Game_triggered();
void on_actionOpen_triggered();
void on_actionSave_As_triggered();
void on_actionSetting_triggered();
void on_actionHelp_triggered();
void on_actionAbout_triggered();
private:
Ui::MainWindow *ui;
QPushButton *btn_career[5];
QLabel *player_info[4], *tp[4][12], *gd[4][12], *cardInfo, *mycard[24];
bool scaleEnable[4][12], scaleMycardEnable[24], scaleCareerEnable[5];
bool gameStart, canCallStart, p1SeCa, chooseMyCard[24], chooseTP1Card[12];
bool p1ChMyCa, checkP1ChMyCa;
bool p1BuCa, checkP1BuCa;
bool p1RmCa, checkP1RmCa, PHMark;
bool p1Prod, checkp1Prod;
bool p1Trad, checkp1Trad;
int playerChoiceCareer, cMCn, cMCm, rmCn, nCanProd, nCanTrad;
bool newGameCheck;
int robotLevel;
};
#endif // MAINWINDOW_H