Closed dlbbld closed 3 years ago
Hello @dlbbld ,
Yes I agree with you the name may lead to some confusion. The reason for it being like that is to make move undoing (MoveBackup#restore
) consistent with other non promotion moves handling: This field is used for unsetting the moved piece when undoing the move. I'll fix this in the next release.
Fixed in version 1.1.23
Thanks, looks fine.
For a promotion move the moving piece is set as the promoted piece in the MoveBackup. This is used as such in the code. If that must be so, I suggest using another name instead of "moving piece". The moving piece for a promotion move is a pawn, so setting the moving piece to the promoted piece is semantically wrong for my understanding. I ran into a small bug for expecting this. Example:
The output is as below, with latest version 1.1.22, which is not as expected for me: