From 9added32009ae56de00c2e0c8359e8e15b80547c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sp=C3=A1=C4=8Dil?= Date: Tue, 23 Jun 2026 21:31:15 +0200 Subject: [PATCH] =?UTF-8?q?feature/hraci:=20vyhodnocen=C3=AD=20konce=20"ta?= =?UTF-8?q?hu";=20p=C5=99epnut=C3=AD=20na=20dal=C5=A1=C3=ADho=20hr=C3=A1?= =?UTF-8?q?=C4=8De=20v=20=C5=99ad=C4=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 633f49e..2484b49 100644 --- a/main.py +++ b/main.py @@ -68,7 +68,7 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple: pointer = nxt_key inp = str(inp) - if re.search("^\d+$", inp): + 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 @@ -105,6 +105,13 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple: elif inp == "h": data = ("count", count, "") return data + elif inp == "k": + global score + players[pointer].append(score) + score = 0 + next_player() + data = ("count", 6, "") + return data def check_value(throw: str) -> bool: throw_s = sorted(throw)