diff --git a/main.py b/main.py index b4f6b60..a1a577a 100644 --- a/main.py +++ b/main.py @@ -3,6 +3,7 @@ from os import system, name import re import csv +score = 0 hodnoty = {} with open("hodnoty.csv", "r") as csv_file: @@ -55,7 +56,7 @@ def evaluate(inp, count, throw): return data old_throw = [] for y in range(count): - if str(y) in inp: + if str(y+1) in inp: old_throw.append(throw[y]) count = len(inp) @@ -63,8 +64,9 @@ def evaluate(inp, count, throw): return data def check_value(throw): - throw.sort() - throw_str = "".join(throw) + throw_s = throw.copy() + throw_s.sort() + throw_str = "".join(throw_s) hodnota = False for h in hodnoty: if h in throw_str: