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):
35
35
#: One of "Win", "Loss", or "Unknown"
36
36
result = str ()
37
37
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
-
42
38
def __init__ (self , number ):
43
39
self .number = number
44
40
self .players = list ()
45
41
self .result = "Unknown"
46
- self .lineup = ""
47
42
48
43
def __iter__ (self ):
49
44
return self .players .__iter__ ()
50
45
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
+
51
54
@property
52
55
def hash (self ):
53
56
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):
425
425
self .teams .sort (key = lambda t : t .number )
426
426
self .humans = self .clients = self .people
427
427
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
-
432
428
self .real_type = real_type (self .teams )
433
429
434
430
# Assign the default region to computer players for consistency
You can’t perform that action at this time.
0 commit comments