fen: 交换Phrase和sideToMove位置

This commit is contained in:
Calcitem 2020-09-05 16:56:15 +08:00
parent 5854bce2d9
commit 93dd3ba971
1 changed files with 5 additions and 3 deletions

View File

@ -341,6 +341,11 @@ const string Position::fen() const
}
}
// Active color
ss << (sideToMove == WHITE ? "w" : "b");
ss << " ";
// Phrase
switch (phase) {
case PHASE_NONE:
@ -363,9 +368,6 @@ const string Position::fen() const
break;
}
ss << " ";
// Active color
ss << (sideToMove == WHITE ? "w" : "b");
ss << " ";
// http://www.xqbase.com/protocol/pgnfen2.htm