oprava indikátoru strikes u prvního záznamu
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
d0def0f7fa
commit
e1739e65cd
1 file changed
+2
-2
@@ -148,9 +148,9 @@ def game():
|
|||||||
strikes: str = ""
|
strikes: str = ""
|
||||||
|
|
||||||
if len(hraci[pointer]) > 0:
|
if len(hraci[pointer]) > 0:
|
||||||
if hraci[pointer][-1:][0] == 0:
|
if hraci[pointer][-1] == 0:
|
||||||
strikes = "x"
|
strikes = "x"
|
||||||
if hraci[pointer][-2:][0] == 0:
|
if len(hraci[pointer]) > 1 and hraci[pointer][-2] == 0:
|
||||||
strikes += "x"
|
strikes += "x"
|
||||||
else:
|
else:
|
||||||
strikes = ""
|
strikes = ""
|
||||||
|
|||||||
Reference in new issue
Block a user