refactoring: drobné úpravy UI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user