From 73e8747b73f4ca7eb2738b1cddd6fe0375241428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sp=C3=A1=C4=8Dil?= Date: Fri, 26 Jun 2026 19:47:20 +0200 Subject: [PATCH 1/3] =?UTF-8?q?feature/exit:=20p=C5=99id=C3=A1na=20mo?= =?UTF-8?q?=C5=BEnost=20do=20hern=C3=AD=20nab=C3=ADdky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index 31b4161..8e210ba 100644 --- a/main.py +++ b/main.py @@ -236,6 +236,7 @@ def game(data: tuple): " - Zadejte kombinaci kostek k ponechání (dojde k jejich vyhodnocení): [pozice kostek] (např. 1 nebo 34 nebo 123456).\n" " - Hodit znovu: [h].\n" f" - Ukončit hod a ponechat si skóre z tohoto hodu ({score}): [k].\n" + " - Ukončit hru: [exit].\n" ) inp = input(msg) data = evaluate(inp, count, th) -- 2.47.3 From 2fa0aa8a950a66e71c2ecdf450ebc277e85c7ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sp=C3=A1=C4=8Dil?= Date: Fri, 26 Jun 2026 19:59:05 +0200 Subject: [PATCH 2/3] =?UTF-8?q?feature/exit:=20p=C5=99id=C3=A1no=20elif=20?= =?UTF-8?q?do=20evaluate()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index 8e210ba..0e32b2e 100644 --- a/main.py +++ b/main.py @@ -133,6 +133,9 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple: 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 -- 2.47.3 From 1fcf01152da981fa46229ceb3e67d724f140b6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sp=C3=A1=C4=8Dil?= Date: Fri, 26 Jun 2026 20:00:30 +0200 Subject: [PATCH 3/3] =?UTF-8?q?feature/exit:=20lou=C4=8D=C3=ADc=C3=AD=20hl?= =?UTF-8?q?=C3=A1=C5=A1ka=20a=20konec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 0e32b2e..d2f916d 100644 --- a/main.py +++ b/main.py @@ -266,6 +266,11 @@ def game(data: tuple): print("Díky za hru a zase příště.") break + elif data[0] == "exit": + clear() + print("Hra byla předčasně ukončena. Snad se zase brzy uvidíme.") + break + def main(): clear() print("Vítejte ve hře v kostky!") -- 2.47.3