implemetace smyčky
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user