refactoring: drobné úpravy UI

This commit is contained in:
David Spáčil
2026-06-27 12:55:51 +02:00
parent 2f8d5b12c2
commit 26ad8508b5
+4 -4
View File
@@ -77,7 +77,7 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple[Any, ...]:
inp = str(inp)
if re.search(r"^\d+$", inp):
if len(inp) > count:
data: tuple[Any, ...] = ("msg", "ER01", "Tolika kostkami nemůžete hodit. Zkuste to znovu:", count, throw)
data: tuple[Any, ...] = ("msg", "ER01", "Tolika kostkami nemůžete hodit. Zkuste to znovu: ", count, throw)
else:
for x in inp:
x = int(x)
@@ -86,7 +86,7 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple[Any, ...]:
ran = "1"
else:
ran = f"1{count}"
data = ("msg", "ER02", f"Zvolte prosím kostky v platném rozsahu ({ran}):", count, throw)
data = ("msg", "ER02", f"Zvolte prosím kostky v platném rozsahu ({ran}): ", count, throw)
return data
old_throw: list[str] = []
pick: list[str] = []
@@ -234,7 +234,7 @@ def game(data: tuple) -> None:
if(th == ""):
th = throw(count)
clear()
print(f"Vítězné skóre: {final_score}.")
# print(f"Vítězné skóre: {final_score}.")
strikes: str = ""
@@ -246,7 +246,7 @@ def game(data: tuple) -> None:
else:
strikes = ""
print(f"Na tahu je {pointer} ({aggr[pointer]}{strikes}).")
print(f"Na tahu je {pointer} ({aggr[pointer]}{strikes}/{final_score}).")
print(show_throw(th))
if not check_value(th) and data[2] == "" and count != 0:
global score