From 0c6f99f841d3f081d5ee3aa2880c41e0d06ddc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sp=C3=A1=C4=8Dil?= Date: Tue, 16 Jun 2026 21:05:28 +0200 Subject: [PATCH] =?UTF-8?q?implemetace=20smy=C4=8Dky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 4d264ca..b24ba74 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ from random import randint +from os import system, name def throw(count): count = int(count) @@ -17,12 +18,23 @@ def show_throw(throw): pretty_list += f"{i} " return pretty_list +def clear(): + if name == 'nt': + _ = system('cls') + else: + _ = system('clear') + +def game(): + new_throw = throw(6) + clear() + print(show_throw(new_throw)) + input("Prosím, stiskněte enter pro další hod:") + game() + def main(): print("Vítejte ve hře v kostky!") input("Prosím, stiskněte enter pro první hod:") - new_throw = throw(6) - print(show_throw(new_throw)) - + game() if __name__ == "__main__": main()