-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.py
executable file
·144 lines (129 loc) · 5.64 KB
/
index.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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import os
from core.classes.Match import Match
from core.colorama import init, Fore
from core.menus.MainMenu import MainMenu
from core.menus.XMLImportMenu import XMLImportMenu
from stats.Passes import printListPlayerPassers
from stats.Passes import printTopPassers
from stats.Passes import printTotalTeamPasses
from stats.Passes import printTeamPassesTimeline
from stats.Passes import getAnglesForPasses
from stats.PassesMultiple import printListPlayerPassersMultiple
from stats.PassesMultiple import printTopPassersMultiple
from stats.PassesMultiple import printTotalTeamPassesMultiple
from stats.PassesMultiple import printTeamPassesTimelineMultiple
from stats.PassesMultiple import getAnglesForPassesMultiple
from stats.Angles import plotAngles
from stats.TestFunctions import printAllPlayers
from stats.TestFunctions import printAllTeams
from stats.TestFunctions import printSingleTeam
from stats.TestFunctions import printOpposingTeams
from stats.BallPossession import percentagePossession
from stats.BallPossession import intervalPossession
from stats.BallPossession import bestPlayerPossession
from stats.BallPossession import zonePossession
from stats.BallPossession import createDataframe
from stats.BallPossession import histogramPossession
from stats.Duels import printDuelsTimeline
from stats.Duels import plotAerialStats
from stats.DuelsMultiple import printDuelsTimelineMultiple
from stats.DuelsMultiple import plotAerialStatsMultiple
from stats.Throwins import printThrowins
from stats.ThrowinsMultiple import printThrowinsMultiple
init()
TESTING = True
program = MainMenu()
xmlMenu = XMLImportMenu(TESTING)
match = Match()
while program.run_program:
print(Fore.WHITE)
program.showMenu()
choice = program.getMenuChoice()
if choice == 'x' or choice == 'X':
program.shutDownProgram()
if choice == 'z' or choice == 'Z':
os.system('cls' if os.name == 'nt' else 'clear')
if program.xml_is_imported:
if program.multiple:
if choice == 'a':
os.system('cls' if os.name == 'nt' else 'clear')
printSingleTeam(match)
if choice == 'b':
os.system('cls' if os.name == 'nt' else 'clear')
printOpposingTeams(match)
if choice == 'c':
os.system('cls' if os.name == 'nt' else 'clear')
printDuelsTimelineMultiple(match)
if choice == 'd':
os.system('cls' if os.name == 'nt' else 'clear')
plotAerialStatsMultiple(match)
if choice == 'e':
os.system('cls' if os.name == 'nt' else 'clear')
printThrowinsMultiple(match)
if choice == 'f':
os.system('cls' if os.name == 'nt' else 'clear')
printTotalTeamPassesMultiple(match)
if choice == 'g':
os.system('cls' if os.name == 'nt' else 'clear')
printTeamPassesTimelineMultiple(match)
if choice == 'h':
os.system('cls' if os.name == 'nt' else 'clear')
printTopPassersMultiple(match)
if choice == 'i':
os.system('cls' if os.name == 'nt' else 'clear')
printListPlayerPassersMultiple(match)
else:
if choice == 'a':
os.system('cls' if os.name == 'nt' else 'clear')
printAllTeams(match)
if choice == 'b':
os.system('cls' if os.name == 'nt' else 'clear')
printAllPlayers(match)
if choice == 'c':
os.system('cls' if os.name == 'nt' else 'clear')
printTotalTeamPasses(match)
if choice == 'd':
os.system('cls' if os.name == 'nt' else 'clear')
printTeamPassesTimeline(match)
if choice == 'e':
os.system('cls' if os.name == 'nt' else 'clear')
printTopPassers(match)
if choice == 'f':
os.system('cls' if os.name == 'nt' else 'clear')
printListPlayerPassers(match)
if choice == 'g':
os.system('cls' if os.name == 'nt' else 'clear')
plotAngles(match)
if choice == 'h':
os.system('cls' if os.name == 'nt' else 'clear')
percentagePossession(match, dataframe, teamComposition)
if choice == 'i':
os.system('cls' if os.name == 'nt' else 'clear')
zonePossession(match, dataframe, teamComposition)
if choice == 'j':
os.system('cls' if os.name == 'nt' else 'clear')
bestPlayerPossession(match, dataframe, teamComposition)
if choice == 'k':
os.system('cls' if os.name == 'nt' else 'clear')
histogramPossession(match, dataframe, teamComposition)
if choice == 'l':
os.system('cls' if os.name == 'nt' else 'clear')
dataframe, teamComposition = createDataframe(match)
if choice == 'm':
os.system('cls' if os.name == 'nt' else 'clear')
printDuelsTimeline(match)
if choice == 'n':
os.system('cls' if os.name == 'nt' else 'clear')
plotAerialStats(match)
if choice == 'o':
os.system('cls' if os.name == 'nt' else 'clear')
printThrowins(match)
else:
if choice == '1':
match = xmlMenu.run(match)
program.xml_is_imported = True
if choice == '2':
xmlMenu.multiple = True
program.multiple = True
match = xmlMenu.run(match)
program.xml_is_imported = True