-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
51 lines (41 loc) · 1.19 KB
/
main.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
"""Root file of the project.
"""
import sys
import nhl
import mlb
import nba
import laliga
def main():
"""Runs main loop for the four leagues.
If a user wants to remove certain leauges, they can comment out the parts from the main loop.
They can also reorder the leagues by swapping parts of the code.
todo:
Post Senior Design additions: Add functionality to enable/disable leauges and reorder them using the config file.
"""
try:
print("Press CTRL-C to stop.")
while True:
try:
nhl.draw_board()
except Exception as e:
print("Error occured")
print(e)
try:
nba.draw_board()
except Exception as e:
print("Error occured")
print(e)
try:
mlb.draw_board()
except Exception as e:
print("Error occured")
print(e)
try:
laliga.draw_board()
except Exception as e:
print("Error occured")
print(e)
except KeyboardInterrupt:
sys.exit(0)
if __name__ == "__main__":
main()