feature/hraci: vyhodnocení konce "tahu"; přepnutí na dalšího hráče v řadě

This commit is contained in:
2026-06-23 21:31:15 +02:00
parent 7e412f4d9e
commit 9added3200
+8 -1
View File
@@ -68,7 +68,7 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple:
pointer = nxt_key
inp = str(inp)
if re.search("^\d+$", inp):
if re.search(r"^\d+$", inp):
if len(inp) > count:
data = ("msg", "ER01", "Tolika kostkami nemůžete hodit. Zkuste to znovu:", count, throw)
return data
@@ -105,6 +105,13 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple:
elif inp == "h":
data = ("count", count, "")
return data
elif inp == "k":
global score
players[pointer].append(score)
score = 0
next_player()
data = ("count", 6, "")
return data
def check_value(throw: str) -> bool:
throw_s = sorted(throw)