def on_touch_up(self, touch): v = Vector(touch.pos) - Vector(touch.opos) if v.length < 20: return if abs(v.x) > abs(v.y): v.y = 0 else: v.x = 0 self.move(*v.normalize())
def on_touch_up(self, touch): v = Vector(touch.pos) - Vector(touch.opos) if v.length() < 20: return if abs(v.x) > abs(v.y): v.y = 0 else: v.x = 0 self.move(*v.normalize())
def on_touch_up(self, touch): v = Vector(touch.pos) - Vector(touch.opos) if v.length() < self.columns: return if abs(v.x) > abs(v.y): v.y = 0 else: v.x = 0 if not self.game_over: self.move(*v.normalize())