-
Notifications
You must be signed in to change notification settings - Fork 0
/
repeatedgame.h
57 lines (48 loc) · 1.08 KB
/
repeatedgame.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
#ifndef REPEATEDGAME_H
#define REPEATEDGAME_H
#include <QMainWindow>
#include <player.h>
#include <QTimer>
#include <QTime>
#include <QList>
#include<qdebug.h>
#include<showscore.h>
#include "ui_showscore.h"
#include<QPainter>
extern showscore *p;
namespace Ui {
class repeatedgame;
}
class repeatedgame : public QMainWindow
{
Q_OBJECT
public:
explicit repeatedgame(QWidget *parent = nullptr);
~repeatedgame();
void paintEvent(QPaintEvent*event);
void startgame(player*opt);
void getresult(player* opt);
QString displayopt(int x);
bool my_act = 1;
bool my_last_act = my_act;
int mytotal = 0;
int mycurrscore = 0;
int currround = 0;
int round = 0;
int num_fighted = 0;
copycat obj1;//创建五个对手对象
cheater obj2;
pink obj3;
grudger obj4;
detective obj5;
QList<player*> optlist;
player* curropt = nullptr;
private slots:
void on_coop_clicked();
void on_cheat_clicked();
void on_summary_clicked();
private:
Ui::repeatedgame *ui;
showscore* sc = new showscore;
};
#endif // REPEATEDGAME_H