summaryrefslogtreecommitdiff
path: root/src/ChessArbiter.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-12-27 11:13:49 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-12-27 11:13:49 +0100
commitf9ac11ad44b00f7e29ef2a9159c65f146f739835 (patch)
tree3238b66903e4919584620d36377474abe72d1e3e /src/ChessArbiter.cpp
parent5fdfda00a90063d6ba6b4b07c6043efa3fb6de84 (diff)
Debug SANParser
Diffstat (limited to 'src/ChessArbiter.cpp')
-rw-r--r--src/ChessArbiter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ChessArbiter.cpp b/src/ChessArbiter.cpp
index 30fc078..29b17c7 100644
--- a/src/ChessArbiter.cpp
+++ b/src/ChessArbiter.cpp
@@ -488,7 +488,12 @@ std::string ChessArbiter::ParseSAN(const std::string &SANMove) {
std::string current_src = move.substr(0, 2);
std::string current_dst = move.substr(2, 2);
if (current_dst == dst) {
- src_candidates.push_back(current_src);
+ // Now ensure that move can be played
+ INIT_BACKUP();
+ if(Play(current_src+current_dst)){
+ src_candidates.push_back(current_src);
+ }
+ RESTORE_BACKUP();
}
}