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

Function create_ball

projects/PONG/main.py:268–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

266
267
268def create_ball():
269 global ball, ball_sprite, game_manager
270 ball = Ball(
271 "assets/ball.png",
272 WIDTH / 2,
273 HEIGHT / 2,
274 4,
275 4,
276 paddle_group,
277 )
278 ball_sprite = pygame.sprite.GroupSingle()
279 ball_sprite.add(ball)
280
281 game_manager = Game_Manager(ball_sprite, paddle_group)
282
283
284# General Setup

Callers 3

easy_gameMethod · 0.85
med_gameMethod · 0.85
hard_gameMethod · 0.85

Calls 2

BallClass · 0.85
Game_ManagerClass · 0.85

Tested by

no test coverage detected