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

Method constrain

projects/PONG/main.py:51–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49 self.constrain()
50
51 def constrain(self):
52 if self.rect.top <= 0:
53 self.rect.top = 0
54 if self.rect.bottom > HEIGHT:
55 self.rect.bottom = HEIGHT
56
57
58class Ball(Block):

Callers 1

updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected