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

Method run_game

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

Source from the content-addressed store, hash-verified

134 self.paddle_group = paddle_group
135
136 def run_game(self):
137 # Drawing Game Objects
138 self.paddle_group.draw(WIN)
139 self.ball_group.draw(WIN)
140
141 # Updating the game objects
142 self.paddle_group.update(self.ball_group)
143 self.ball_group.update()
144 self.reset_ball()
145 self.draw_score()
146
147 def reset_ball(self):
148 if self.ball_group.sprite.rect.left >= WIDTH:

Callers 3

easy_gameMethod · 0.80
med_gameMethod · 0.80
hard_gameMethod · 0.80

Calls 4

reset_ballMethod · 0.95
draw_scoreMethod · 0.95
drawMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected