forked from linouk23/NBA-Player-Movements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
18 lines (14 loc) · 726 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from Game import Game
import argparse
parser = argparse.ArgumentParser(description='Process some arguments about NBA game.')
parser.add_argument('--path', type=str,
help='a path to json file to read events from', required = True)
parser.add_argument('--event', type=int, default=0,
help="""an index of the event to create animation to
(the indexing start with zero, if you index goes beyond out
the total number of events (plays), we will show you the last
one of the game)""")
args = parser.parse_args()
game = Game(path_to_json=args.path, event_index=args.event)
game.read_json()
game.start()