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