mirror of
https://github.com/tiyn/yeschess.git
synced 2025-10-18 22:01:21 +02:00
bugfix chess: moveToNotation promotion part wrong
The function moveToNotation added the promotion character even if a piece and not a pawn moves to the final rank.
This commit is contained in:
@@ -184,7 +184,7 @@ proc bestMove*(chess: Chess, depth: int): Move =
|
||||
var tmpChess = chess
|
||||
tmpChess.checkedMove(move)
|
||||
var tmpEval = -tmpChess.negaMax(depth, LoVal, HiVal)
|
||||
echo("move:", moveToNotation(move), "; eval:", tmpEval)
|
||||
echo("move:", moveToNotation(move, tmpChess.board), "; eval:", tmpEval)
|
||||
if tmpEval > bestEval:
|
||||
bestEval = tmpEval
|
||||
bestMove = move
|
||||
|
Reference in New Issue
Block a user