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

Method __init__

projects/PONG/main.py:59–65  ·  view source on GitHub ↗
(self, path, x_pos, y_pos, speed_x, speed_y, paddles)

Source from the content-addressed store, hash-verified

57
58class Ball(Block):
59 def __init__(self, path, x_pos, y_pos, speed_x, speed_y, paddles):
60 super().__init__(path, x_pos, y_pos)
61 self.speed_x = speed_x * random.choice((-1, 1))
62 self.speed_y = speed_y * random.choice((-1, 1))
63 self.paddles = paddles
64 self.active = False
65 self.score_time = 0
66
67 def update(self):
68 if self.active:

Callers 4

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected