From e1739e65cda386336c8bc174a98193ce02ef5c18 Mon Sep 17 00:00:00 2001 From: gitea-actions Date: Thu, 20 Aug 2026 17:52:19 +0200 Subject: [PATCH] =?UTF-8?q?oprava=20indik=C3=A1toru=20strikes=20u=20prvn?= =?UTF-8?q?=C3=ADho=20z=C3=A1znamu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sliceování [-2:][0] vrátí u seznamu s jediným záznamem tentýž prvek jako [-1:][0], takže po první nule se zobrazilo rovnou "xx". Nahrazeno přímým indexováním s kontrolou délky. Co-Authored-By: Claude Opus 5 --- dice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dice.py b/dice.py index b36c722..02b46c9 100644 --- a/dice.py +++ b/dice.py @@ -148,9 +148,9 @@ def game(): strikes: str = "" if len(hraci[pointer]) > 0: - if hraci[pointer][-1:][0] == 0: + if hraci[pointer][-1] == 0: strikes = "x" - if hraci[pointer][-2:][0] == 0: + if len(hraci[pointer]) > 1 and hraci[pointer][-2] == 0: strikes += "x" else: strikes = ""