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

Method update

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

Source from the content-addressed store, hash-verified

65 self.score_time = 0
66
67 def update(self):
68 if self.active:
69 self.rect.x += self.speed_x
70 self.rect.y += self.speed_y
71 self.collisions()
72 else:
73 self.restart_counter()
74
75 def collisions(self):
76 if self.rect.top <= 0 or self.rect.bottom >= HEIGHT:

Callers 15

all_legal_movesMethod · 0.45
ping_pong.pyFile · 0.45
update_itemsMethod · 0.45
get_per_frame_mesh_dataFunction · 0.45
draw_textMethod · 0.45
show_resultsMethod · 0.45
runMethod · 0.45
reset_gameMethod · 0.45
instructionIMGFunction · 0.45
aboutIMGFunction · 0.45
introscreenFunction · 0.45
countdownFunction · 0.45

Calls 2

collisionsMethod · 0.95
restart_counterMethod · 0.95

Tested by

no test coverage detected