pawel150199 / chess-ai

Chess game with AI
0 stars 0 forks source link

Game with AI - error #14

Closed Kduszynska closed 5 months ago

Kduszynska commented 5 months ago

Finding best move... Traceback (most recent call last): File "/Users/kasiaduszynska/Desktop/Szachy/src/run.py", line 4, in main.mainloop() File "/Users/kasiaduszynska/Desktop/Szachy/src/main.py", line 221, in mainloop move = ai.eval(board) File "/Users/kasiaduszynska/Desktop/Szachy/src/ai.py", line 130, in eval eval, move = self.minimax(main_board, self.depth, False, -math.inf, math.inf) File "/Users/kasiaduszynska/Desktop/Szachy/src/ai.py", line 112, in minimax if not best_move: UnboundLocalError: local variable 'best_move' referenced before assignment (base) kasiaduszynska@air-kasia Szachy %

Zrzut ekranu 2024-06-10 o 10 39 13
pawel150199 commented 5 months ago

MR #16 should solve the issue.