forked from roba269/wai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhvc_match.h
More file actions
38 lines (34 loc) · 767 Bytes
/
hvc_match.h
File metadata and controls
38 lines (34 loc) · 767 Bytes
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
#ifndef HVC_MATCH_H
#define HVC_MATCH_H
#include <string>
#include <vector>
#include "common_define.h"
class Sandbox;
class HVCMatch {
// Note: only support 1 human vs 1 computer currently
public:
void InitMatch(MatchType type, int id, std::string name) {
m_type = type;
m_id = id;
m_name = name;
}
void SetComputer(Sandbox *computer, int submit_id) {
m_computer = computer;
m_sid = submit_id;
}
void SetJudge(Sandbox *judge) {
m_judge = judge;
}
void Start();
private:
MatchType m_type;
Sandbox *m_judge;
Sandbox *m_computer;
int m_sid;
std::string m_record;
int m_id;
int m_winner;
time_t m_start_time, m_end_time;
std::string m_name;
};
#endif