MCPcopy Create free account
hub / github.com/geekcomputers/Python / load_balls

Function load_balls

PongPong_Game/pong/load.py:7–14  ·  view source on GitHub ↗
(win_size: Tuple, radius: float, speed: Tuple, batch=None)

Source from the content-addressed store, hash-verified

5
6
7def load_balls(win_size: Tuple, radius: float, speed: Tuple, batch=None):
8 balls = []
9 ball_x = win_size[0] / 2
10 ball_y = win_size[1] / 2
11 new_ball = ball.BallObject(x=ball_x, y=ball_y, radius=radius, batch=batch)
12 new_ball.velocity_x, new_ball.velocity_y = speed[0], speed[1]
13 balls.append(new_ball)
14 return balls
15
16
17def load_paddles(

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected