From e4fc41a65632db97593b4d53e4c38b523b63a998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sp=C3=A1=C4=8Dil?= Date: Sun, 21 Jun 2026 16:08:04 +0200 Subject: [PATCH] feature/hod: oprava check_value --- main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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: