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

Method draw_score

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

Source from the content-addressed store, hash-verified

153 self.ball_group.sprite.reset_ball()
154
155 def draw_score(self):
156 player_score = game_font.render(str(self.player_score), True, accent_color)
157 opponent_score = game_font.render(str(self.opponent_score), True, accent_color)
158
159 player_score_rect = player_score.get_rect(midleft=(WIDTH / 2 + 40, HEIGHT / 2))
160 opponent_score_rect = opponent_score.get_rect(
161 midright=(WIDTH / 2 - 40, HEIGHT / 2)
162 )
163
164 WIN.blit(player_score, player_score_rect)
165 WIN.blit(opponent_score, opponent_score_rect)
166
167
168class Cursor(pygame.sprite.Sprite):

Callers 1

run_gameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected