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

Function load_paddles

PongPong_Game/pong/load.py:17–27  ·  view source on GitHub ↗
(
    paddle_pos: Tuple, width: float, height: float, acc: Tuple, batch=None
)

Source from the content-addressed store, hash-verified

15
16
17def load_paddles(
18 paddle_pos: Tuple, width: float, height: float, acc: Tuple, batch=None
19):
20 paddles = []
21 new_paddle = paddle.Paddle(
22 x=paddle_pos[0], y=paddle_pos[1], width=width, height=height, batch=batch
23 )
24 new_paddle.rightx = new_paddle.x + width
25 new_paddle.acc_left, new_paddle.acc_right = acc[0], acc[1]
26 paddles.append(new_paddle)
27 return paddles
28
29
30def load_rectangles(win_size: Tuple, border: float, batch=None):

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected