Improve communication with old CECP engines #709
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR consists of two parts:
An addition to
XboardEngine
(CECP engine forfeits on claim of illegal move #411) leads to some problems. Older CECP engines do not understand many of the version 2 protocol keywords. During initialisation they claim "Illegal Move" when given an unknown command. This causes game terminations even before the first move.This PR Introduces the flag
m_comPhase
, an enumeration to discriminate the initialisation phase from the phase of game play.Now "Illegal move" claims by an CECP engine are only checked during the game phase.
Older CECP engines send their resignation or a result claim in a different format. The second patch of this PR converts the older format into new result strings and calls
XboardEngine::parseLine
again. The new flagm_parserMode
is used to leave out these additional tests for older result codes if a version 2 engine has been initialised.Resolves #645