MCPcopy Index your code
hub / github.com/geekcomputers/Python / __init__

Method __init__

Snake Game Using Turtle/scoreboard.py:16–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

14class Scoreboard(Turtle):
15 """ This class maintains the scoreboard, high score, and game messages. """
16 def __init__(self):
17 super().__init__()
18 self.screen = Screen() # Get access to the screen object
19 self.score = 0
20 self.high_score = self.load_high_score()
21 self.penup()
22 self.hideturtle()
23 self.update_scoreboard()
24
25 def load_high_score(self):
26 """Loads high score from highscore.txt. Returns 0 if not found."""

Callers

nothing calls this directly

Calls 2

load_high_scoreMethod · 0.95
update_scoreboardMethod · 0.95

Tested by

no test coverage detected