-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvent.h
57 lines (44 loc) · 981 Bytes
/
Event.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
#pragma once
#include <vector>
#include "Team.h"
#include "Match.h"
#include "Root.h"
class Event {
private:
std::vector<Match> matches;
std::vector<Team> teams;
unsigned short maxRank;
Root root;
void calculatePossibility(unsigned long i);
void winTeam(
std::vector<Team> &teams,
const unsigned short number);
void updateSummary(
std::vector<Team> &teams,
double probability
);
void updateMonteCarloSummary(
std::vector<Team> &teams,
double probability
);
public:
Event(unsigned short maxRank);
~Event();
void addMatch(
unsigned short red1,
unsigned short red2,
unsigned short red3,
unsigned short blue1,
unsigned short blue2,
unsigned short blue3,
double redWinProbability = .5);
void addTeam(
unsigned short number,
unsigned char qs,
unsigned short firstSort = 0,
unsigned short secondSort = 0,
unsigned short thirdSort = 0,
unsigned short fourthSort = 0);
void calculate();
void calculate(size_t numSims);
};