diff options
author | emkael <emkael@tlen.pl> | 2023-02-08 12:12:50 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2023-02-08 12:12:50 +0100 |
commit | ade973c25ca403c5385983f42fbf60c906e25b9b (patch) | |
tree | 76c01bd97743c36d3568fc8638982ac55fb0fa9c /jfr_playoff/dto.py | |
parent | 4c297358a15cbbaa4fbb00da468f85d91fcc68f5 (diff) |
Fetching selected team name in DTO object
Diffstat (limited to 'jfr_playoff/dto.py')
-rw-r--r-- | jfr_playoff/dto.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jfr_playoff/dto.py b/jfr_playoff/dto.py index 28aa446..cc7f618 100644 --- a/jfr_playoff/dto.py +++ b/jfr_playoff/dto.py @@ -25,6 +25,10 @@ class Team(object): carry_over = floor(10 * self.score) / 10.0 return carry_over + @property + def selected_name(self): + return self.name[min(max(0, self.selected_team), len(self.name)-1)] + def __init__(self): self.place = [] self.name = [] |