levels reworked

comp generator function added to util.

patch  bump
This commit is contained in:
onyx-and-iris
2022-07-09 12:26:53 +01:00
parent 845ef2441e
commit a1d6cf1042
4 changed files with 23 additions and 15 deletions

View File

@@ -1,3 +1,6 @@
from typing import Iterator
def cache_bool(func, param):
"""Check cache for a bool prop"""
@@ -49,3 +52,15 @@ def script(func):
return func(remote, script)
return wrapper
def comp(t0: tuple, t1: tuple) -> Iterator[bool]:
"""
Generator function, accepts two tuples.
Evaluates equality of each member in both tuples.
"""
for a, b in zip(t0, t1):
if b <= 9500:
yield a == b
yield True