Fix matches from set-up position in engine-defined variants
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 6 Apr 2020 17:43:21 +0000 (19:43 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 6 Apr 2020 17:43:21 +0000 (19:43 +0200)
commit02c43a4eca5f3d9289b117f73548e2c1fdac277a
tree64dea722de25862b42fd95ca164830950f85cb94
parent6d159d80e9721872429e0c83b2ff9c60da80e1bd
Fix matches from set-up position in engine-defined variants

Unfortunately XBoard loads positions from a position file before it
starts the engine for the next game in a match. For an engine-defined
game this means the engine did not get the opportunity to define a
pieceToCharTable with its 'setup'  command before the FEN is parsed,
with as a result that non-standard pieces in the FEN will not be
recognized. This is now fixed in a kludgy way, by remembering the
pieceToCharTable an engine sends as a first response to the 'variant'
command, and using that for the next game in a match as well, before
attempting to parse the FEN.
backend.c