-
Notifications
You must be signed in to change notification settings - Fork 0
/
league.py
39 lines (28 loc) · 1.05 KB
/
league.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
#league.py
class League():
def __init__(self, name, conferences):
self.name = name
self.conferences = conferences
self.all_players = {} # str name to object
self.all_teams = {}
def con_falsify(self):
#figure out what we would want to return in this
temp = list(self.conferences.values())
output = {}
for obj in temp:
output[obj.id] = obj.name
return {"League Name" : self.name, "Conferences" : output}
def players_falsify(self):
#figure out what we would want to return in this
temp = list(self.all_players.values())
output = {}
for obj in temp:
output[obj.id] = obj.name
return {"League Name" : self.name, "Players" : output}
def teams_falsify(self):
#figure out what we would want to return in this
temp = list(self.all_teams.values())
output = {}
for obj in temp:
output[obj.id] = obj.name
return {"League Name" : self.name, "Teams" : output}