-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame_analisys.py
53 lines (41 loc) · 1.26 KB
/
game_analisys.py
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
class game_Analisys(object):
def __init__(self):
self.home_team=[]
self.away_team=[]
self.head_to_head=[]
'''
we have no way of predicting if the home_team has more points than the away_team
other than compare the names that come from the self arrays with the names that come in a_list
a_list[a,13,b,14]
home_team[a]
away_team[b]
'''
def set_teams_points(self,a_list):
if self.home_team[0]==a_list[0]:
self.home_team.append(a_list[1])
self.away_team.append(a_list[3])
else:
self.home_team.append(a_list[3])
self.away_team.append(a_list[1])
# away_team.append(away_team)
def print_team_stats(self):
print (self.home_team)
print (self.away_team)
print (self.head_to_head)
def set_team_names(self,ahome_team,aaway_team):
self.home_team.append(ahome_team)
self.away_team.append(aaway_team)
def last_6_matches_percentage_home__team(self,alist):
self.home_team+=alist
def last_6_matches_percentage_away__team(self,alist):
self.away_team+=alist
def latest_home_matches(self,alist):
self.home_team+=alist
def latest_away_matches(self,alist):
self.away_team+=alist
def overall_stats_home(self,alist):
self.home_team+=alist
def overall_stats_away(self,alist):
self.away_team+=alist
def vs(self,alist):
self.head_to_head+=alist