Skip to content

Commit

Permalink
Fixing analysis arrow bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pathev committed Sep 21, 2024
1 parent 484e865 commit 584a165
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ChessTrainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ async def analyze(self):
for info in self.analysis.multipv]
bs=moves_scores_list[0][1]
self.draw_analyze_arrows([m for m,s in moves_scores_list
if abs(s-bs)<MAX_CT_DIFF])
if bs is None or s is None or abs(s-bs)<MAX_CT_DIFF])
except chess.engine.AnalysisComplete:
break
except asyncio.CancelledError:
Expand Down Expand Up @@ -1120,6 +1120,7 @@ def refresh(self, event={}):
except IndexError:
cur_move=None

self.canvas.delete("analyze_arrow")
self.canvas.delete("square")
self.canvas.delete("arrow")
color = chess.WHITE
Expand Down

0 comments on commit 584a165

Please sign in to comment.