Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #381 from riffnshred/beta
Browse files Browse the repository at this point in the history
  • Loading branch information
riffnshred authored Jun 17, 2022
2 parents 14baa7f + edc08b5 commit af5cc84
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.9
1.6.10
4 changes: 2 additions & 2 deletions src/boards/stanley_cup_champions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

class StanleyCupChampions:
def __init__(self, data, matrix, sleepEvent):
debug.info("Stanley cup champions id: {}".format(data.ScChampions_id))
self.team_id = data.ScChampions_id
debug.info("Stanley cup champions id: {}".format(data.cup_winner_id))
self.team_id = data.cup_winner_id
if self.team_id is None:
return
self.team_abbrev = data.teams_info[self.team_id].abbreviation
Expand Down
5 changes: 2 additions & 3 deletions src/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def __init__(self, config):
self.refresh_playoff()

# Stanley cup champions
self.ScChampions_id = self.check_stanley_cup_champion()
self.cup_winner_id = self.check_stanley_cup_champion()


#
Expand Down Expand Up @@ -528,8 +528,7 @@ def check_stanley_cup_champion(self):
for x in range(len(self.current_round.series[0].matchupTeams)):
if self.current_round.series[0].matchupTeams[x].seriesRecord.wins >= 4:
return self.current_round.series[0].matchupTeams[x].team.id
else:
return False
return

def series_by_conference():
"""
Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

SCRIPT_NAME = "NHL-LED-SCOREBOARD"

SCRIPT_VERSION = "1.6.9"
SCRIPT_VERSION = "1.6.10"


def run():
Expand Down
12 changes: 6 additions & 6 deletions src/renderer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ def __render_game_day(self):
sbrenderer = ScoreboardRenderer(self.data, self.matrix, self.scoreboard)
self.check_new_goals()
if self.data.isPlayoff and self.data.stanleycup_round:
self.check_stanley_cup_champion()
if self.data.ScChampions_id:
self.data.check_stanley_cup_champion()
if self.data.cup_winner_id:
StanleyCupChampions(self.data, self.matrix, self.sleepEvent).render()

self.__render_postgame(sbrenderer)
Expand All @@ -180,8 +180,8 @@ def __render_game_day(self):
sbrenderer = ScoreboardRenderer(self.data, self.matrix, self.scoreboard)
self.check_new_goals()
if self.data.isPlayoff and self.data.stanleycup_round:
self.check_stanley_cup_champion()
if self.data.ScChampions_id:
self.data.check_stanley_cup_champion()
if self.data.cup_winner_id:
StanleyCupChampions(self.data, self.matrix, self.sleepEvent).render()
self.__render_postgame(sbrenderer)

Expand Down Expand Up @@ -407,5 +407,5 @@ def draw_end_of_game_indicator(self):
self.matrix.graphics.DrawLine(self.matrix.matrix, (self.matrix.width * .5) - 9, self.matrix.height - 1, (self.matrix.width * .5) + 9, self.matrix.height - 1, color)

def test_stanley_cup_champion(self, team_id):
self.data.ScChampions_id = team_id
StanleyCupChampions(self.data, self.matrix, self.sleepEvent).render()
self.data.cup_winner_id = team_id
StanleyCupChampions(self.data, self.matrix, self.sleepEvent).render()

0 comments on commit af5cc84

Please sign in to comment.