diff --git a/main.py b/main.py index ce7fa5b..c63029c 100644 --- a/main.py +++ b/main.py @@ -78,7 +78,6 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple: if re.search(r"^\d+$", inp): if len(inp) > count: data = ("msg", "ER01", "Tolika kostkami nemůžete hodit. Zkuste to znovu:", count, throw) - return data else: for x in inp: x = int(x) @@ -110,7 +109,7 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple: h_bool = False data = ("count", new_count, old_throw) - return data + elif inp == "h": if h_bool: clear() @@ -119,7 +118,7 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple: else: h_bool = True data = ("count", count, "") - return data + elif inp == "k": global score @@ -142,13 +141,14 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple: winner = check_win() if winner: data = ("win", winner, aggr[winner]) - return data + elif inp == "exit": data = ("exit",) - return data + else: data = ("msg", "ER03", "Zadejte prosím platnou hodnotu:", count, throw) - return data + + return data def check_value(throw: str) -> bool: throw_s = sorted(throw)