added random BOT difficulty

This commit is contained in:
CHIBOUB Chakib 2024-09-11 15:49:09 +02:00
parent ca243473e3
commit 898cecef96

View File

@ -63,7 +63,9 @@ class Game:
if self.botgame:
x += 1
if x == 60:
self.future_ball_position = await self.predict_ball_trajectory()
# Random BOT difficulty..
steps = random.randint(10, 60)
self.future_ball_position = await self.predict_ball_trajectory(steps)
x = 0
await self.update_bot_position()
await self.handle_pad_movement()