From 08706724a500b49a023d91da2d04fb78c38e2946 Mon Sep 17 00:00:00 2001 From: Dimitri Merejkowsky Date: Fri, 1 Feb 2019 20:14:19 +0100 Subject: [PATCH] more preparation --- sources/hangman/scores.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sources/hangman/scores.py b/sources/hangman/scores.py index 09f9d38..006215e 100644 --- a/sources/hangman/scores.py +++ b/sources/hangman/scores.py @@ -7,10 +7,22 @@ def parse_scores(): return res -def main(): - scores = parse_scores() +def print_scores(scores): + print("Tableau des résultats:") for name, score in scores.items(): print(name, score) +def register_score(scores, name, new_score): + pass + + +def main(): + scores = parse_scores() + name = input("nom: ") + new_score = input("score: ") + register_score(scores, name, new_score) + print_scores(scores) + + main()