release: v0.1.0 #14

Merged
david-spacil merged 36 commits from version/v0.1.0 into main 2026-06-25 14:08:57 +02:00
Showing only changes of commit 16d940253d - Show all commits
+14 -5
View File
@@ -1,5 +1,6 @@
from random import randint from random import randint
from os import system, name from os import system, name
import re
def throw(count): def throw(count):
count = int(count) count = int(count)
@@ -24,17 +25,25 @@ def clear():
else: else:
_ = system('clear') _ = system('clear')
def game(): def evaluate(inp, count):
new_throw = throw(6) inp = str(inp)
if re.search("^\d+$", inp):
count = len(inp)
return count
def game(count):
new_throw = throw(count)
clear() clear()
print(show_throw(new_throw)) print(show_throw(new_throw))
input("Prosím, stiskněte enter pro další hod:") inp = input("Vyberte, kterými kostkami chcete hodit znovu (např. 135):")
game() count = evaluate(inp, count)
game(count)
def main(): def main():
print("Vítejte ve hře v kostky!") print("Vítejte ve hře v kostky!")
input("Prosím, stiskněte enter pro první hod:") input("Prosím, stiskněte enter pro první hod:")
game() count = 6
game(count)
if __name__ == "__main__": if __name__ == "__main__":
main() main()