mirror of
https://github.com/AudebertAdrien/ft_transcendence.git
synced 2026-02-04 11:40:25 +01:00
added random BOT difficulty
This commit is contained in:
parent
ca243473e3
commit
898cecef96
@ -63,7 +63,9 @@ class Game:
|
|||||||
if self.botgame:
|
if self.botgame:
|
||||||
x += 1
|
x += 1
|
||||||
if x == 60:
|
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
|
x = 0
|
||||||
await self.update_bot_position()
|
await self.update_bot_position()
|
||||||
await self.handle_pad_movement()
|
await self.handle_pad_movement()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user