summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-10 17:13:23 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-10 17:13:23 +0100
commit6ebd96825576b2da8e8acf2ac85d0b82a7531424 (patch)
tree7af1484cbf3a4b6529cabcbd94f0ed1d320c3f2c /src
parentdb78ff212da7abed937b03b120b1cf1afba2f37f (diff)
Add # sign to SAN moves when player is checkmate
Diffstat (limited to 'src')
-rw-r--r--src/ChessArbiter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ChessArbiter.cpp b/src/ChessArbiter.cpp
index fdda48d..8612fc4 100644
--- a/src/ChessArbiter.cpp
+++ b/src/ChessArbiter.cpp
@@ -178,8 +178,10 @@ 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)){
+ // Don't forget the plus and # sign on the SAN moves
+ if(IsCheckMate()){
+ SAN+="#";
+ } else if(IsCheck(fen.player)){
SAN+="+";
}