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

Method movements

projects/Space Shooter/main.py:481–489  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

479 self.object.insert_laser()
480
481 def movements(self):
482 if self.up and self.object.y >= 0:
483 self.object.y -= 5
484 if (
485 self.down
486 and self.object.y + Display().spaceship.get_height()
487 <= Display().windows.get_height()
488 ):
489 self.object.y += 5
490
491 def execute(self):
492 while True:

Callers 1

executeMethod · 0.95

Calls 1

DisplayClass · 0.70

Tested by

no test coverage detected