-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathgamescreen.cpp
More file actions
510 lines (466 loc) · 20.3 KB
/
gamescreen.cpp
File metadata and controls
510 lines (466 loc) · 20.3 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
/*
* Copyright 2013-2014 KanMemo Project.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "gamescreen.h"
#include "kanmusumemory_global.h"
#include "webview.h"
#include "numberguide.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QRect>
#include <QtCore/QTime>
#include <QtCore/QThread>
#include <QtGui/QColor>
#include <QtGui/QImage>
#include <QtGui/QMouseEvent>
class GameScreen::Private
{
public:
Private(const QImage &image, GameScreen *parent, RecognizeInfo *recognizeInfo);
bool isVisible(PartType partType) const;
void click(WebView *webView, GameScreen::PartType partType, GameScreen::WaitInterval waitInterval);
bool isContainMajorDamageShip();
bool checkTurnCompassScreen() const;
bool isChangedCurrentFleet(QRgb prevFactor) const;
int getClickExpeditionItemFleetNo(const QPointF &pos);
void getExpeditionTime(qint64 *total, qint64 *remain);
int getExpeditionFleetNo();
bool isClickExpeditionStartButton(const QPointF &pos);
private:
void detectScreenType();
void setScreenType(GameScreen::ScreenType s);
QRgb color(const QRect &rect) const;
QRgb color(const QImage &img, const QRect &rect) const;
bool fuzzyCompare(QRgb a, QRgb b, int range = 0x20) const;
void click(WebView *webView, const QPoint &point, GameScreen::WaitInterval waitInterval);
void imageBinarization(QImage *img, const QRect &rect, const int border, const QRgb hi, const QRgb lo);
int numberMatching(const QImage &image, const QRect &rect, const QList<NumberGuide> &guideList, QSize guideSize);
private:
GameScreen *q;
QImage image;
//認識に必要な情報を管理してくれるクラス
RecognizeInfo *recognizeInfo;
public:
GameScreen::ScreenType screenType;
QRgb currentFleetFactor; //戦果報告画面で現在の艦隊を示す因子(次に取得したときに比較して使う)
};
GameScreen::Private::Private(const QImage &image, GameScreen *parent, RecognizeInfo *recogExpediInfo)
: q(parent)
, image(image)
, screenType(UnknownScreen)
{
//認識に必要な情報を管理してくれるクラス
if(recogExpediInfo != NULL){
//外から指定されたらそっちを使う
this->recognizeInfo = recogExpediInfo;
}else{
//NULLなら
this->recognizeInfo = new RecognizeInfo();
}
detectScreenType();
}
//表示してる画面を判定
void GameScreen::Private::detectScreenType()
{
if (fuzzyCompare(color(QRect(0, 0, 5, 5)), qRgb(45, 43, 43))) {
//カタログ画面か
setScreenType(CatalogScreen);
}else if(fuzzyCompare(color(recognizeInfo->buttleResultRect1()), recognizeInfo->buttleResultCheckColor1(), 0x10)
&& fuzzyCompare(color(recognizeInfo->buttleResultRect2()), recognizeInfo->buttleResultCheckColor2(), 0x10)) {
//戦果画面
setScreenType(ButtleResultScreen);
//現在の艦隊因子の保存
currentFleetFactor = color(this->recognizeInfo->buttleResultFleetChangeRect());
#if 0
}else if(fuzzyCompare(color(BUTTLE_RECT1), BUTTLE_DAYTIME_CHECK_COLOR1, 10)
&& fuzzyCompare(color(BUTTLE_RECT2), BUTTLE_DAYTIME_CHECK_COLOR2)) {
//昼戦
// QRgb rgb1 = color(BUTTLE_RECT1);
// QRgb rgb2 = color(BUTTLE_RECT2);
// qDebug() << "daytime:" << qRed(rgb1) << "," << qGreen(rgb1) << "," << qBlue(rgb1)
// << qRed(rgb2) << "," << qGreen(rgb2) << "," << qBlue(rgb2);
setScreenType(DaytimeButtleScreen);
}else if(fuzzyCompare(color(BUTTLE_RECT1), BUTTLE_NIGHT_CHECK_COLOR1, 10)
&& fuzzyCompare(color(BUTTLE_RECT2), BUTTLE_NIGHT_CHECK_COLOR2)) {
//夜戦
// QRgb rgb1 = color(BUTTLE_RECT1);
// QRgb rgb2 = color(BUTTLE_RECT2);
// qDebug() << "night:" << qRed(rgb1) << "," << qGreen(rgb1) << "," << qBlue(rgb1)
// << qRed(rgb2) << "," << qGreen(rgb2) << "," << qBlue(rgb2);
setScreenType(NightButtleScreen);
#endif
}else if(fuzzyCompare(color(recognizeInfo->buttleGoOrBackRect()), recognizeInfo->buttleGoOrBackCheckColor())){
//戦闘後(進撃・撤退)選択画面
setScreenType(GoOrBackScreen);
}else if(checkTurnCompassScreen()){
//羅針盤を回す画面
// 他の画面も誤認してしまってるので注意
setScreenType(TurnCompassScreen);
}else if(isVisible(HeaderPart) && fuzzyCompare(color(EXPEDITION_RECT), EXPEDITION_CHECK_COLOR)){
//遠征画面か
setScreenType(ExpeditionScreen);
}
}
//画面の特定部分を表示してるかを判定
bool GameScreen::Private::isVisible(PartType partType) const
{
bool ret = false;
switch (partType) {
case HeaderPart:
ret = fuzzyCompare(color(QRect(300, 3, 490, 4)), qRgb(42, 150, 163));
break;
case Ship1Part:
ret = fuzzyCompare(color(DETAIL_RECT_SHIP1_1), DETAIL_CHECK_COLOR1)
&& fuzzyCompare(color(DETAIL_RECT_SHIP1_2), DETAIL_CHECK_COLOR2);
break;
case Ship2Part:
ret = fuzzyCompare(color(DETAIL_RECT_SHIP2_1), DETAIL_CHECK_COLOR1)
&& fuzzyCompare(color(DETAIL_RECT_SHIP2_2), DETAIL_CHECK_COLOR2);
break;
case Ship3Part:
ret = fuzzyCompare(color(DETAIL_RECT_SHIP3_1), DETAIL_CHECK_COLOR1)
&& fuzzyCompare(color(DETAIL_RECT_SHIP3_2), DETAIL_CHECK_COLOR2);
break;
case Ship4Part:
ret = fuzzyCompare(color(DETAIL_RECT_SHIP4_1), DETAIL_CHECK_COLOR1)
&& fuzzyCompare(color(DETAIL_RECT_SHIP4_2), DETAIL_CHECK_COLOR2);
break;
case Ship5Part:
ret = fuzzyCompare(color(DETAIL_RECT_SHIP5_1), DETAIL_CHECK_COLOR1)
&& fuzzyCompare(color(DETAIL_RECT_SHIP5_2), DETAIL_CHECK_COLOR2);
break;
case Ship6Part:
ret = fuzzyCompare(color(DETAIL_RECT_SHIP6_1), DETAIL_CHECK_COLOR1)
&& fuzzyCompare(color(DETAIL_RECT_SHIP6_2), DETAIL_CHECK_COLOR2);
break;
}
return ret;
}
void GameScreen::Private::click(WebView *webView, GameScreen::PartType partType, GameScreen::WaitInterval waitInterval)
{
switch (partType) {
case Ship1Part:
click(webView, DETAIL_RECT_SHIP1_1.center(), waitInterval);
break;
case Ship2Part:
click(webView, DETAIL_RECT_SHIP2_1.center(), waitInterval);
break;
case Ship3Part:
click(webView, DETAIL_RECT_SHIP3_1.center(), waitInterval);
break;
case Ship4Part:
click(webView, DETAIL_RECT_SHIP4_1.center(), waitInterval);
break;
case Ship5Part:
click(webView, DETAIL_RECT_SHIP5_1.center(), waitInterval);
break;
case Ship6Part:
click(webView, DETAIL_RECT_SHIP6_1.center(), waitInterval);
break;
default:
break;
}
}
//戦果報告画面で大破が含まれるか
bool GameScreen::Private::isContainMajorDamageShip()
{
bool ret = false;
if(screenType == GameScreen::ButtleResultScreen){
// qDebug() << " Buttle Result";
QImage mask_image(":/resources/MajorDamageMask.png");
QImage imagework(mask_image);
QPainter painter(&imagework);
QImage imageBin(image);
//2値化
imageBinarization(&imageBin, imageBin.rect(), recognizeInfo->buttleResultCharExistBinBorder(), qRgb(255,255,255), qRgb(0,0,0));
int i = 0;
foreach (QRect rect, recognizeInfo->buttleResultCharRectList()) {
//艦娘バナーがあるか
if(fuzzyCompare(color(imageBin, recognizeInfo->buttleResultCharRectList().at(i))
, recognizeInfo->buttleResultCharExistColor().rgb
, recognizeInfo->buttleResultCharExistColor().border)){
//あったので判定
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
painter.drawImage(0, 0, mask_image);
painter.setCompositionMode(QPainter::RasterOp_SourceAndDestination);
painter.drawImage(0, 0, image, rect.x(), rect.y());
//// QRgb rgb = color(imagework, BUTTLE_RESULT_MAJOR_DAMAGE_RECT);
//// qDebug() << yi << " color:" << qRed(rgb) << "," << qGreen(rgb) << "," << qBlue(rgb)
//// << ":" << fuzzyCompare(color(imagework, BUTTLE_RESULT_MAJOR_DAMAGE_RECT), BUTTLE_RESULT_MAJOR_DAMAGE_CHECK_COLOR, 5);
ret |= fuzzyCompare(color(imagework, recognizeInfo->buttleResultMajorDamageRect()), recognizeInfo->buttleResultMajorDamageCheckColor(), 5);
// QRgb rgb = color(imageBin, recognizeInfo->buttleResultCharRectList().at(i));
// qDebug() << " exist:" << i << " color:" << qRed(rgb) << "," << qGreen(rgb) << "," << qBlue(rgb)
// << "/" << qRed(recognizeInfo->buttleResultCharExistColor().rgb) << "," << qGreen(recognizeInfo->buttleResultCharExistColor().rgb) << "," << qBlue(recognizeInfo->buttleResultCharExistColor().rgb)
// << "/" << recognizeInfo->buttleResultCharExistColor().border;
// }else{
// QRgb rgb = color(imageBin, recognizeInfo->buttleResultCharRectList().at(i));
// qDebug() << " not exist:" << i << " color:" << qRed(rgb) << "," << qGreen(rgb) << "," << qBlue(rgb)
// << "/" << qRed(recognizeInfo->buttleResultCharExistColor().rgb) << "," << qGreen(recognizeInfo->buttleResultCharExistColor().rgb) << "," << qBlue(recognizeInfo->buttleResultCharExistColor().rgb)
// << "/" << recognizeInfo->buttleResultCharExistColor().border;
}
i++;
}
}
return ret;
}
//コンパスを回す画面化調べる
bool GameScreen::Private::checkTurnCompassScreen() const
{
QImage imagework(":/resources/CompassMask.png");
QPainter painter(&imagework);
painter.setCompositionMode(QPainter::RasterOp_SourceAndDestination);
painter.drawImage(0, 0, image, recognizeInfo->buttleCompassRect().x(), recognizeInfo->buttleCompassRect().y());
// QRgb rgb = color(imagework, QRect(0, 0, imagework.width(), imagework.height()));
// qDebug() << "compass color:" << qRed(rgb) << "," << qGreen(rgb) << "," << qBlue(rgb)
// << ":" << fuzzyCompare(color(imagework, QRect(0, 0, imagework.width(), imagework.height())), BUTTLE_COMPASS_CHECK_COLOR, 5);
return fuzzyCompare(color(imagework, QRect(0, 0, imagework.width(), imagework.height())), recognizeInfo->buttleCompassCheckColor(), 5);
}
//戦果報告画面の艦隊が切り替わったか
bool GameScreen::Private::isChangedCurrentFleet(QRgb prevFactor) const
{
return fuzzyCompare(color(BUTTLE_RESULT_FLEET_CHANGE_RECT), prevFactor, 0x1);
}
//遠征画面でクリックしたアイテムの出撃艦隊番号
int GameScreen::Private::getClickExpeditionItemFleetNo(const QPointF &pos)
{
int ret = -1;
if(screenType == ExpeditionScreen){
for(int i=0; i<recognizeInfo->itemRectList().length(); i++){
if(recognizeInfo->itemRectList().at(i).contains(pos.x(), pos.y())){
QImage work(image);
//2値化
imageBinarization(&work, work.rect(), 200, qRgb(255,255,255), qRgb(0,0,0));
//既に遠征に出ているマークあるか
int click_item_number = numberMatching(work, recognizeInfo->flagRectList().at(i)
, recognizeInfo->flagGuideList(), QSize(23, 20));
qDebug() << " checkClickExpeditionItem:pos=" << i << ", fleet=" << click_item_number;
ret = click_item_number;
break;
}
}
}
return ret;
}
//遠征の時間を取得する
void GameScreen::Private::getExpeditionTime(qint64 *total, qint64 *remain)
{
if(screenType == ExpeditionScreen){
QImage work(image);
//2値化
imageBinarization(&work, work.rect(), 200, qRgb(255,255,255), qRgb(0,0,0));
//各桁の値を取り出す
int remain_value[6];
int total_value[6];
bool remain_error = false;
bool total_error = false;
for(int i=0; i<6; i++){
remain_value[i] = numberMatching(work, recognizeInfo->remainTimeRectList().at(i)
, recognizeInfo->numberGuideList(), QSize(9, 13));
total_value[i] = numberMatching(work, recognizeInfo->totalTimeRectList().at(i)
, recognizeInfo->numberGuideList(), QSize(9, 13));
}
qDebug() << " getExpeditionTime:" << total_value[0] << total_value[1] << total_value[2] << total_value[3] << total_value[4] << total_value[5];
qDebug() << " :" << remain_value[0] << remain_value[1] << remain_value[2] << remain_value[3] << remain_value[4] << remain_value[5];
for(int i=0; i<6; i++){
if(remain_value[i] == -1) remain_error = true;
if(total_value[i] == -1) total_error = true;
}
if(remain_error){
*remain = -1;
}else{
*remain = ((remain_value[0]*10+remain_value[1])*3600 + (remain_value[2]*10+remain_value[3])*60 + remain_value[4]*10+remain_value[5])*1000;
}
if(total_error){
*total = -1;
}else{
*total = ((total_value[0]*10+total_value[1])*3600 + (total_value[2]*10+total_value[3])*60 + total_value[4]*10+total_value[5])*1000;
}
}
}
//遠征開始時に選択している艦隊番号を取得する
int GameScreen::Private::getExpeditionFleetNo()
{
int ret = -1;
QImage work(image);
//2値化
imageBinarization(&work, EXPEDITION_SELECT_FLEET_RECT, 100, qRgb(255,255,255), qRgb(0,0,0));
//旗の位置の色を取得
QRgb rgb2 = color(work, QRect(381, 108, 23, 20));
QRgb rgb3 = color(work, QRect(411, 108, 23, 20));
QRgb rgb4 = color(work, QRect(441, 108, 23, 20));
if(fuzzyCompare(rgb2, qRgb(255,255,255), 5)){
ret = 2;
}else if(fuzzyCompare(rgb3, qRgb(255,255,255), 5)){
ret = 3;
}else if(fuzzyCompare(rgb4, qRgb(255,255,255), 5)){
ret = 4;
}
return ret;
}
//遠征開始ボタンを押したか?
bool GameScreen::Private::isClickExpeditionStartButton(const QPointF &pos)
{
if(EXPEDITION_START_BUTTON_RECT.contains(pos.x(), pos.y())){
return fuzzyCompare(color(EXPEDITION_START_BUTTON_RECT), EXPEDITION_START_BUTTON_COLOR);
}else{
return false;
}
}
void GameScreen::Private::click(WebView *webView, const QPoint &point, GameScreen::WaitInterval waitInterval)
{
qDebug() << Q_FUNC_INFO << __LINE__ << webView << point << waitInterval;
QPointF pos = point + webView->getGameRect().topLeft();
QMouseEvent eventPress(QEvent::MouseButtonPress
, pos
, Qt::LeftButton, 0, 0);
QCoreApplication::sendEvent(webView, &eventPress);
QMouseEvent eventRelease(QEvent::MouseButtonRelease
, pos
, Qt::LeftButton, 0, 0);
QCoreApplication::sendEvent(webView, &eventRelease);
int interval = waitInterval + static_cast<int>(qrand() % CLICK_EVENT_FLUCTUATION);
QTime timer;
timer.start();
while (timer.elapsed() < interval) {
QCoreApplication::processEvents();
QThread::usleep(1000);
}
qDebug() << Q_FUNC_INFO << __LINE__ << timer.elapsed();
qDebug() << Q_FUNC_INFO << __LINE__ << webView << point << waitInterval;
}
//画像を二値化する
void GameScreen::Private::imageBinarization(QImage *img, const QRect &rect, const int border, const QRgb hi, const QRgb lo)
{
int y0 = rect.y();
int x0 = rect.x();
int h = rect.height();
int w = rect.width();
for (int y = 0; y < h; y++) {
QRgb *row = reinterpret_cast<QRgb *>(img->scanLine(y0 + y)) + x0;
for (int x = 0; x < w; x++) {
if((qRed(*row) > border) || (qGreen(*row) > border)|| (qBlue(*row) > border)){
(*row) = hi;
}else{
(*row) = lo;
}
row++;
}
}
}
//数字とのマッチングする(2値化した画像を使用すること)
int GameScreen::Private::numberMatching(const QImage &image, const QRect &rect, const QList<NumberGuide> &guideList, QSize guideSize)
{
QImage work(guideSize, QImage::Format_ARGB32);
QPainter painter(&work);
QRgb rgb;
QRgb rgb_src;
int ret = -1;
int match_count = 0;
qDebug() << "matching:" << rect;
for(int m=0; m<guideList.length(); m++){
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
painter.drawImage(0, 0, image, rect.x(), rect.y(), rect.width(), rect.height());
rgb_src = color(work, work.rect());
painter.setCompositionMode(QPainter::RasterOp_SourceAndDestination);
painter.drawImage(0, 0, guideList.at(m).image);
rgb = color(work, work.rect());
if(qRed(rgb_src) == 0 && qGreen(rgb_src) == 0 && qBlue(rgb_src) == 0){
//元が真っ黒
qDebug() << " makuro";
break;
}else if(qRed(rgb) < guideList.at(m).border){
qDebug() << QString(" %1:match(%2<%3)").arg(guideList.at(m).number).arg(qRed(rgb)).arg(guideList.at(m).border);
ret = guideList.at(m).number;
match_count++;
break;
}else{
qDebug() << QString(" %1:(%2) %3").arg(guideList.at(m).number).arg(qRed(rgb)).arg(guideList.at(m).image.isNull());
}
}
return ret;
}
QRgb GameScreen::Private::color(const QRect &rect) const
{
return image.copy(rect).scaled(1, 1, Qt::IgnoreAspectRatio, Qt::SmoothTransformation).pixel(0, 0);
}
QRgb GameScreen::Private::color(const QImage &img, const QRect &rect) const
{
return img.copy(rect).scaled(1, 1, Qt::IgnoreAspectRatio, Qt::SmoothTransformation).pixel(0, 0);
}
bool GameScreen::Private::fuzzyCompare(QRgb a, QRgb b, int range) const
{
// qDebug() << Q_FUNC_INFO << __LINE__ << qRed(a) << qGreen(a) << qBlue(a);
// qDebug() << Q_FUNC_INFO << __LINE__ << qRed(b) << qGreen(b) << qBlue(b);
return (qAbs(qRed(a) - qRed(b)) < range) && (qAbs(qGreen(a) - qGreen(b)) < range) && (qAbs(qBlue(a) - qBlue(b)) < range);
}
void GameScreen::Private::setScreenType(GameScreen::ScreenType s)
{
if (screenType == s) return;
screenType = s;
emit q->screenTypeChanged(s);
}
GameScreen::GameScreen(const QImage &image, RecognizeInfo *recogExpediInfo, QObject *parent)
: QObject(parent)
, d(new Private(image, this, recogExpediInfo))
{
connect(this, &QObject::destroyed, [this]() { delete d; });
}
GameScreen::ScreenType GameScreen::screenType() const
{
return d->screenType;
}
bool GameScreen::isVisible(GameScreen::PartType partType) const
{
return d->isVisible(partType);
}
//戦果報告画面で大破が含まれるか
bool GameScreen::isContainMajorDamageShip() const
{
return d->isContainMajorDamageShip();
}
//戦果報告画面で現在の艦隊を示す因子
QRgb GameScreen::getCurrentFleetFactor() const
{
return d->currentFleetFactor;
}
//戦果報告画面で艦隊が切り替わったか判定
bool GameScreen::isChangedCurrentFleet(QRgb prevFactor)
{
return d->isChangedCurrentFleet(prevFactor);
}
//遠征画面でどのアイテムをクリックしたか
int GameScreen::getClickExpeditionItemFleetNo(const QPointF &pos) const
{
return d->getClickExpeditionItemFleetNo(pos);
}
//遠征の時間を取得する
void GameScreen::getExpeditionTime(qint64 *total, qint64 *remain)
{
d->getExpeditionTime(total, remain);
}
//遠征開始時に選択してる艦隊番号取得する
int GameScreen::getExpeditionFleetNo() const
{
return d->getExpeditionFleetNo();
}
//遠征開始ボタンを押したか?
bool GameScreen::isClickExpeditionStartButton(const QPointF &pos) const
{
return d->isClickExpeditionStartButton(pos);
}
void GameScreen::click(WebView *webView, GameScreen::PartType partType, GameScreen::WaitInterval waitInterval)
{
d->click(webView, partType, waitInterval);
}