MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / __init__

Method __init__

projects/Snake Game/src/game.py:12–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10 """Manages the gameplay logic and its user interactions."""
11
12 def __init__(self):
13 self.display = Display()
14 self.snake = Snake()
15 self.score = 0
16 self.food = None
17 self.place_food()
18 self.high_score = self.load_high_score()
19
20 def game_loop(self):
21 while True:

Callers

nothing calls this directly

Calls 4

place_foodMethod · 0.95
load_high_scoreMethod · 0.95
DisplayClass · 0.90
SnakeClass · 0.90

Tested by

no test coverage detected