-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFutureMatch.java
106 lines (90 loc) · 2.96 KB
/
FutureMatch.java
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
public class FutureMatch
{
boolean premier, LAN;
long date;
Team winner, loser;
double confidence;
public FutureMatch(boolean premier, boolean LAN, long date, Team team1, Team team2, MatchPredictor p)
{
this.premier = premier;
this.LAN = LAN;
this.date = date;
Match match = new Match(premier, LAN, date, team1.players, team2.players, team1.region, team2.region);
if(p.predict(match)){
winner = team1;
loser = team2;
} else {
winner = team2;
loser = team1;
}
confidence = Math.abs(match.predictionConfidence);
}
public FutureMatch(boolean premier, boolean LAN, long date, FutureMatch match1, boolean winner1, FutureMatch match2, boolean winner2, MatchPredictor p)
{
this.premier = premier;
this.LAN = LAN;
this.date = date;
Team team1, team2;
if(winner1){
team1 = match1.winner;
} else {
team1 = match1.loser;
}
if(winner2){
team2 = match2.winner;
} else {
team2 = match2.loser;
}
Match match = new Match(premier, LAN, date, team1.players, team2.players, team1.region, team2.region);
if(p.predict(match)){
winner = team1;
loser = team2;
} else {
winner = team2;
loser = team1;
}
confidence = Math.abs(match.predictionConfidence);
}
public FutureMatch(boolean premier, boolean LAN, long date, Team team1, FutureMatch match2, boolean winner2, MatchPredictor p)
{
this.premier = premier;
this.LAN = LAN;
this.date = date;
Team team2;
if(winner2){
team2 = match2.winner;
} else {
team2 = match2.loser;
}
Match match = new Match(premier, LAN, date, team1.players, team2.players, team1.region, team2.region);
if(p.predict(match)){
winner = team1;
loser = team2;
} else {
winner = team2;
loser = team1;
}
confidence = Math.abs(match.predictionConfidence);
}
public FutureMatch(boolean premier, boolean LAN, long date, FutureMatch match1, boolean winner1, Team team2, MatchPredictor p)
{
this.premier = premier;
this.LAN = LAN;
this.date = date;
Team team1;
if(winner1){
team1 = match1.winner;
} else {
team1 = match1.loser;
}
Match match = new Match(premier, LAN, date, team1.players, team2.players, team1.region, team2.region);
if(p.predict(match)){
winner = team1;
loser = team2;
} else {
winner = team2;
loser = team1;
}
confidence = Math.abs(match.predictionConfidence);
}
}