summaryrefslogtreecommitdiff
path: root/src/ChessArbiter.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-10 17:07:27 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-10 17:07:27 +0100
commitdb78ff212da7abed937b03b120b1cf1afba2f37f (patch)
treed90dc37e7c391d001f92f05284a0cdf101560552 /src/ChessArbiter.cpp
parent779cf4f082343da894da89635127ae7bda22c657 (diff)
Add plus sign to SAN moves when player is in check
Diffstat (limited to 'src/ChessArbiter.cpp')
-rw-r--r--src/ChessArbiter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ChessArbiter.cpp b/src/ChessArbiter.cpp
index 593ece2..fdda48d 100644
--- a/src/ChessArbiter.cpp
+++ b/src/ChessArbiter.cpp
@@ -178,6 +178,11 @@ bool ChessArbiter::Play(const std::string &move, char promote) {
return (false);
}
+ // Don't forget the plus sign on the SAN move
+ if(IsCheck(fen.player)){
+ SAN+="+";
+ }
+
// Update position map (repetitions draw)
if (positions.count(fen.board) == 0) {
positions[fen.board] = 1;