From e90450102177b9e11371178fa6dc86a60a61c2d4 Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Sat, 10 Jun 2023 19:12:52 -0500 Subject: [PATCH] update your position every 10 ticks --- learn_sql_model/game/game.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/learn_sql_model/game/game.py b/learn_sql_model/game/game.py index dc09e46..12eeb1a 100644 --- a/learn_sql_model/game/game.py +++ b/learn_sql_model/game/game.py @@ -70,11 +70,10 @@ class Client: if self.moving_right: self.hero.x += speed - HeroUpdate( - **{k: v for k, v in self.hero.dict().items() if v is not None} - ).update() - if self.ticks % 10 == 0: + HeroUpdate( + **{k: v for k, v in self.hero.dict().items() if v is not None} + ).update() self.others = [hero for hero in HeroRead.list() if hero.id != self.hero.id] def render(self):