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

Method increase_score

Snake Game Using Turtle/scoreboard.py:43–46  ·  view source on GitHub ↗

Increases score and updates the display.

(self)

Source from the content-addressed store, hash-verified

41 self.write(f"Score: {self.score} | High Score: {self.high_score}", align=ALIGNMENT, font=SCORE_FONT)
42
43 def increase_score(self):
44 """Increases score and updates the display."""
45 self.score += 1
46 self.update_scoreboard()
47
48 def reset(self):
49 """Checks for new high score, saves it, and resets the score."""

Callers 1

game_loopFunction · 0.80

Calls 1

update_scoreboardMethod · 0.95

Tested by

no test coverage detected