-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpttournament.h
84 lines (67 loc) · 1.59 KB
/
rpttournament.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
79
80
81
82
83
84
#ifndef RPTTOURNAMENT_H
#define RPTTOURNAMENT_H
#include <QMainWindow>
#include <QPainter>
#include"player.h"
#include<QList>
#include <QWidget>
#include <QStackedWidget>
#include<QMessageBox>
#include<QDebug>
#include<QTime>
#include<QHash>
#include<QMap>
#include"lastpage.h"
namespace Ui {
class rpttournament;
}
class rpttournament : public QMainWindow
{
Q_OBJECT
public:
explicit rpttournament(QWidget *parent = nullptr);
~rpttournament();
void paintEvent(QPaintEvent*event);
void game();
void eliminate();
void reproduce();
void refresh(player*a);
void showresult();
QList<player*>list;
static bool comp( player* a, player*b);
//设置玩家数量
int n_copycat = 3;
int n_cheat = 3;
int n_pink = 6;
int n_grugder = 3;
//int n_detective = 0;
int n_duck =3;
int n_simple = 3;
int n_rotten = 4;
//初始化参数
float mis_rate = 0.0;
int doublewin_reward = 2;
int doublelose_reward = 0;
int win_reward = 3;
int lose_reward = -1;
int n_eliminate = 5;
int round = 10;
private slots:
void on_pushButton_clicked();
void on_showrole_clicked();
void on_nextpage_clicked();
void on_pushButton_2_clicked();
void on_rewarddone_clicked();
void on_done3_clicked();
void on_startgame_clicked();
void on_end_clicked();
void on_game_clicked();
void on_elim_clicked();
void on_repro_clicked();
void on_tolastpage_clicked();
private:
Ui::rpttournament *ui;
QStackedWidget *stackedWidget;
lastpage* lp = new lastpage;
};
#endif // RPTTOURNAMENT_H