File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -35,19 +35,22 @@ class Team(object):
3535 #: One of "Win", "Loss", or "Unknown"
3636 result = str ()
3737
38- #: A string representation of the team play races like PP or TPZZ. Random
39- #: pick races are not reflected in this string
40- lineup = str ()
41-
4238 def __init__ (self , number ):
4339 self .number = number
4440 self .players = list ()
4541 self .result = "Unknown"
46- self .lineup = ""
4742
4843 def __iter__ (self ):
4944 return self .players .__iter__ ()
5045
46+ @property
47+ def lineup (self ):
48+ """
49+ A string representation of the team play races like PP or TPZZ. Random
50+ pick races are not reflected in this string
51+ """
52+ return '' .join (sorted (p .play_race [0 ].upper () for p in self .players ))
53+
5154 @property
5255 def hash (self ):
5356 raw_hash = ',' .join (sorted (p .url for p in self .players ))
Original file line number Diff line number Diff line change @@ -425,10 +425,6 @@ def get_team(team_id):
425425 self .teams .sort (key = lambda t : t .number )
426426 self .humans = self .clients = self .people
427427
428- #Create an store an ordered lineup string
429- for team in self .teams :
430- team .lineup = '' .join (sorted (player .play_race [0 ].upper () for player in team ))
431-
432428 self .real_type = real_type (self .teams )
433429
434430 # Assign the default region to computer players for consistency
You can’t perform that action at this time.
0 commit comments