Uri Blass wrote:
The reason that I decided to make and unmake moves is that even after knowing that a move is legal(I have legal move generator) it is not clear if the move is check or not check and there still may be an error.
It is possible that one Rf2 is Rf2 and one Rf2 is Rf2+ (indirect check) .
When I look at my code of ReadNextMove(a lot of it is also copied from Crafty) I see that one of the conditions to make move is
if (givecheck==0||kingincheck>0)
In other words the case when both happen is also considered as legal
and Rf2 is consider as legal move even if the right move is Rf2+ but Rf2+ is considered as illegal when the right move is Rf2
In other words in the following diagram
[diag]8/8/k7/8/8/8/4R1R1/5BK1 w - - 0 1[/diag]
Rf2 is considered as ambigous and error but Rf2+ is clear.
I am not sure if it is right to do it and my common sense says that Rf2 is clear because no need to write Rgf2 when only one rook can do it without check.
Uri
PGN-specs says that both Rf2 and Rf2+ are ambigous:
http://www.very-best.de/pgn-spec.htm
PGN-specifications wrote:Neither the appearance nor the absence of either a check or checkmating indicator is used for disambiguation purposes. This means that if two (or more) pieces of the same type can move to the same square the differences in checking status of the moves does not allieviate the need for the standard rank and file disabiguation described above. (Note that a difference in checking status for the above may occur only in the case of a discovered check.)