From 516ad4d8743477cd7125c02d5bae2d8ac3ecb4e2 Mon Sep 17 00:00:00 2001 From: Lenard Lindstrom Date: Sun, 15 Oct 2023 19:50:58 -0700 Subject: [PATCH] Update pygame.examples.go_over_there for Python 3.12 Python 3.12 function `random.randint()` expects integer arguments only. The go_over_there example was passing a float as the second argument. --- examples/go_over_there.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/go_over_there.py b/examples/go_over_there.py index 9b538bc359..d4b9b59bcf 100644 --- a/examples/go_over_there.py +++ b/examples/go_over_there.py @@ -40,7 +40,7 @@ def reset(): balls = [] for x in range(MAX_BALLS): pos = pygame.Vector2( - random.randint(0, SCREEN_SIZE.x), random.randint(0, SCREEN_SIZE.y) + random.randint(0, int(SCREEN_SIZE.x)), random.randint(0, int(SCREEN_SIZE.y)) ) speed = random.uniform(MIN_SPEED, MAX_SPEED)