tournament works.. but things are not in the right place
This commit is contained in:
@@ -32,3 +32,26 @@ class View:
|
||||
else:
|
||||
print("Mauvais format d'ine")
|
||||
|
||||
|
||||
def input_scores(self, match_list):
|
||||
for match in match_list:
|
||||
print(match)
|
||||
print("Scores pour match", match_list.index(match) + 1, " :")
|
||||
while True:
|
||||
try:
|
||||
result = input(f"1.{match.player1}, 2.{match.player2}, 3.Nul\n")
|
||||
if result in ("1", "2", "3"):
|
||||
if result == "1":
|
||||
match.player1.score += 1
|
||||
elif result == "2":
|
||||
match.player2.score += 1
|
||||
elif result == "3":
|
||||
match.player1.score += 0.5
|
||||
match.player2.score += 0.5
|
||||
break
|
||||
else:
|
||||
print("Entrez un chiffre entre 1 et 3")
|
||||
except ValueError:
|
||||
print("Veuillez entrer un chiffre")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user