-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.h
48 lines (37 loc) · 872 Bytes
/
game.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
#ifndef GAME_H
#define GAME_H
#include <QMainWindow>
#include "word.h"
#include "QTimer"
namespace Ui {
class game;
}
class game : public QMainWindow
{
Q_OBJECT
public:
explicit game(QWidget *parent = nullptr);
~game();
Word *words[10000];
int cnt; //word的数量
struct grid {
int x,y;
bool inUse;
}grids[100];
QTimer myTimer;
int cntWords=0; //计数,到第几个了
int wrong=0;
int cntQuit = 0;
//显示结果
void result();
bool resulted = false; //是否已经显示结果
private slots:
void importStr(QString &);
void on_pushButton_clicked();
void gridsCondition(int x); //控制当前grid的状态
void on_lineEdit_returnPressed();
private:
Ui::game *ui;
QString ans[10000];
};
#endif // GAME_H