fix: pong: online

This commit is contained in:
2024-05-14 15:48:49 +02:00
parent b186dd8cc5
commit 3d9e0208a2

View File

@ -135,7 +135,7 @@ def get_first_impact(segments: list[Segment], ball: Ball):
inc_x: float = (-1) * get_sign(cos) * (config.STROKE_THICKNESS + config.BALL_SIZE / 2) inc_x: float = (-1) * get_sign(cos) * (config.STROKE_THICKNESS + config.BALL_SIZE / 2)
inc_y: float = get_sign(sin) * (config.STROKE_THICKNESS + config.BALL_SIZE / 2) inc_y: float = get_sign(sin) * (config.STROKE_THICKNESS + config.BALL_SIZE / 2)
ball_segment: Segment = Segment(ball.position.location, Point(ball.position.location.x + inc_x, ball.position.location.y + inc_y)) ball_segment: Segment = Segment(ball.position.location, Point(ball.position.location.x + cos, ball.position.location.y - sin))
data: dict | None = None data: dict | None = None