From ddadf97e0e986e422eddea56701abc6b18766cfd Mon Sep 17 00:00:00 2001 From: Tipragot Date: Sun, 7 Jan 2024 09:17:50 +0100 Subject: [PATCH] Save unfinished work --- src/scenes/game.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scenes/game.py b/src/scenes/game.py index 1a6a493..3f26877 100644 --- a/src/scenes/game.py +++ b/src/scenes/game.py @@ -558,8 +558,10 @@ def _update_bot(world: World): # On se déplace vers la meilleure option diff = target - bot[Position].y - if abs(diff) > 10: + if abs(diff) > bot[Speed] * world[Delta]: bot[Position].y += (diff / abs(diff)) * bot[Speed] * world[Delta] + else: + bot[Position].y = target def __check_bonus_collision(world: World):