Jelajahi Sumber

fix tap if x is tuple

Richard Köhl 1 tahun lalu
induk
melakukan
6f6d78af41
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      dungeon.py

+ 3 - 0
dungeon.py

@@ -83,6 +83,9 @@ def tap(name, x, y=None):
     sleep += random.uniform(0, 0.2)
     text = f"- {name} (pause for {sleep}s)"
 
+    if y is None and isinstance(x, tuple):
+        x, y, *_ = x
+
     tap_helper(x + random.randint(-3, 3), y + random.randint(-3, 3), text)
     time.sleep(sleep)