-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoproblemsolvethread.h
40 lines (33 loc) · 1.01 KB
/
autoproblemsolvethread.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
#ifndef AUTOPROBLEMSOLVETHREAD_H
#define AUTOPROBLEMSOLVETHREAD_H
#include <QThread>
#include <iostream>
#include<windows.h>
#include <cstdlib>
#include <ctime>
#include"map.h"
using namespace std;
class AutoProblemSolveThread : public QThread
{
Q_OBJECT
public:
AutoProblemSolveThread();
AutoProblemSolveThread(int** gameMap_0,int rowSize,int columnSize,bool showProgress,int sleepTime);
void stop();
void run() override;
bool allCleared(int** gameMap,int rowSize,int columnSize);
signals:
void drawPathLine(int index_x1,int index_y1,int index_x2,int index_y2,QList<Vertex> *list);
void eliminate(int** gameMap_0,bool showProgress,int index_x1,int index_y1,int index_x2,int index_y2);
void hideButton(int index_x1,int index_y1,int index_x2,int index_y2);
void autoSolveFinish();
private:
volatile bool stopped;
int** gameMap=nullptr;
int rowSize=10;
int columnSize=10;
int sleepTime=500;
bool showProgress=true;
Map map;
};
#endif // AUTOPROBLEMSOLVETHREAD_H