release: v0.2.0 #28
@@ -78,7 +78,6 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple:
|
|||||||
if re.search(r"^\d+$", inp):
|
if re.search(r"^\d+$", inp):
|
||||||
if len(inp) > count:
|
if len(inp) > count:
|
||||||
data = ("msg", "ER01", "Tolika kostkami nemůžete hodit. Zkuste to znovu:", count, throw)
|
data = ("msg", "ER01", "Tolika kostkami nemůžete hodit. Zkuste to znovu:", count, throw)
|
||||||
return data
|
|
||||||
else:
|
else:
|
||||||
for x in inp:
|
for x in inp:
|
||||||
x = int(x)
|
x = int(x)
|
||||||
@@ -110,7 +109,7 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple:
|
|||||||
h_bool = False
|
h_bool = False
|
||||||
|
|
||||||
data = ("count", new_count, old_throw)
|
data = ("count", new_count, old_throw)
|
||||||
return data
|
|
||||||
elif inp == "h":
|
elif inp == "h":
|
||||||
if h_bool:
|
if h_bool:
|
||||||
clear()
|
clear()
|
||||||
@@ -119,7 +118,7 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple:
|
|||||||
else:
|
else:
|
||||||
h_bool = True
|
h_bool = True
|
||||||
data = ("count", count, "")
|
data = ("count", count, "")
|
||||||
return data
|
|
||||||
elif inp == "k":
|
elif inp == "k":
|
||||||
global score
|
global score
|
||||||
|
|
||||||
@@ -142,13 +141,14 @@ def evaluate(inp: Any, count: int, throw: str) -> tuple:
|
|||||||
winner = check_win()
|
winner = check_win()
|
||||||
if winner:
|
if winner:
|
||||||
data = ("win", winner, aggr[winner])
|
data = ("win", winner, aggr[winner])
|
||||||
return data
|
|
||||||
elif inp == "exit":
|
elif inp == "exit":
|
||||||
data = ("exit",)
|
data = ("exit",)
|
||||||
return data
|
|
||||||
else:
|
else:
|
||||||
data = ("msg", "ER03", "Zadejte prosím platnou hodnotu:", count, throw)
|
data = ("msg", "ER03", "Zadejte prosím platnou hodnotu:", count, throw)
|
||||||
return data
|
|
||||||
|
return data
|
||||||
|
|
||||||
def check_value(throw: str) -> bool:
|
def check_value(throw: str) -> bool:
|
||||||
throw_s = sorted(throw)
|
throw_s = sorted(throw)
|
||||||
|
|||||||
Reference in New Issue
Block a user