feature/konec-hry: nastavení vítězného skóre
This commit is contained in:
@@ -11,6 +11,7 @@ pointer = ""
|
||||
first = ""
|
||||
h_bool = True
|
||||
aggr = {}
|
||||
final_score = 10000
|
||||
|
||||
with open("hodnoty.csv", "r") as csv_file:
|
||||
csv_reader = csv.reader(csv_file)
|
||||
@@ -146,6 +147,7 @@ def add_players(iter=False):
|
||||
global players
|
||||
global pointer
|
||||
global first
|
||||
global final_score
|
||||
|
||||
if not iter:
|
||||
var = "prvního hráče"
|
||||
@@ -157,6 +159,11 @@ def add_players(iter=False):
|
||||
if inp == "x":
|
||||
if not iter:
|
||||
add_players()
|
||||
inp = input("Zadejte finální skóre (nechte prázdné pro výchozích 10 000): ")
|
||||
if inp != "":
|
||||
inp = int(inp)
|
||||
final_score = inp
|
||||
|
||||
elif inp == "":
|
||||
print("Jméno nemůže být prázdné.")
|
||||
add_players(iter)
|
||||
@@ -179,7 +186,8 @@ def game(data: tuple):
|
||||
if(th == ""):
|
||||
th = throw(count)
|
||||
clear()
|
||||
print(f"Na tahu je {pointer} ({aggr[pointer]})")
|
||||
print(f"Vítězné skóre: {final_score}.")
|
||||
print(f"Na tahu je {pointer} ({aggr[pointer]}).")
|
||||
print(show_throw(th))
|
||||
if not check_value(th) and data[2] == "" and count != 0:
|
||||
global score
|
||||
@@ -213,6 +221,7 @@ def game(data: tuple):
|
||||
print(msg)
|
||||
|
||||
def main():
|
||||
clear()
|
||||
print("Vítejte ve hře v kostky!")
|
||||
add_players()
|
||||
input("Prosím, stiskněte enter pro první hod:")
|
||||
|
||||
Reference in New Issue
Block a user