forked from roba269/wai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_match.h
More file actions
37 lines (33 loc) · 752 Bytes
/
simple_match.h
File metadata and controls
37 lines (33 loc) · 752 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
#ifndef SIMPLE_MATCH_H
#define SIMPLE_MATCH_H
#include <string>
#include <vector>
#include "common_define.h"
class Sandbox;
class SimpleMatch {
public:
void InitMatch(MatchType type, int id, std::string name) {
m_type = type;
m_name = name;
m_id = id;
}
void AddPlayer(Sandbox *player, int submit_id) {
m_player.push_back(player);
m_sid.push_back(submit_id);
}
void SetJudge(Sandbox *judge) {
m_judge = judge;
}
void Start();
private:
MatchType m_type;
std::string m_name;
std::vector<Sandbox*> m_player;
std::vector<int> m_sid;
Sandbox *m_judge;
int m_id;
int m_winner;
time_t m_start_time, m_end_time;
std::string m_record;
};
#endif