-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
53 lines (44 loc) · 1.08 KB
/
player.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
#ifndef PLAYER_H
#define PLAYER_H
#include "header.h"
#include "problem.h"
#include <QLabel>
class Player
{
public:
Player(const QString &na="",int x=0);
~Player();
void calcSum();
void clear();
class Result
{
public:
Result() {score=0,usedTime=0,state=0,detail="";}
double usedTime;
int score;
char state;
QString detail;
/*state:
*N: 正常
*C: 编译错误
*F: 找不到文件
*S: 超过代码长度限制
*E: 测评器或校验器出错
* : 未测评
*/
bool operator <(const Result&B) const
{
return score<B.score||(score==B.score&&usedTime>B.usedTime);
}
bool operator ==(const Result&B) const
{
return score==B.score&&usedTime==B.usedTime;
}
} sum;
int id,type; //type = 0:normal; -1:std; -2:jyk; 1:bogang;
QString name,name_list;
vector<Result> problem;
vector<int> style;
vector<QLabel*> label;
};
#endif // PLAYER_H