2 Commits 90791bab75 ... dd300f7e5d

Autore SHA1 Messaggio Data
  Richard Köhl dd300f7e5d only show two digits after komma 1 anno fa
  Richard Köhl 6f6d78af41 fix tap if x is tuple 1 anno fa
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      dungeon.py

+ 4 - 1
dungeon.py

@@ -81,7 +81,10 @@ def tap(name, x, y=None):
         sleep = 1
 
     sleep += random.uniform(0, 0.2)
-    text = f"- {name} (pause for {sleep}s)"
+    text = f"- {name} (pause for {sleep:.2f}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)