ref: 26d5e64b0162c1d46b301a7afb2fd30eee630395
parent: 1de237cf620543322a5ff2f8b885a192467bacf6
author: zamfofex <zamfofex@twdb.moe>
date: Sat Jun 22 22:44:33 EDT 2024
fix castling notation
--- a/chess.c
+++ b/chess.c
@@ -894,6 +894,20 @@
to_x = move->to % 10 - 1;
to_y = move->to / 10 - 2;
+ if (chess->board[move->from] % 16 == moonfish_king && from_x == 4)
+ {+ if (to_x == 2)
+ {+ strcpy(name, "O-O-O");
+ return;
+ }
+ if (to_x == 6)
+ {+ strcpy(name, "O-O");
+ return;
+ }
+ }
+
if (chess->board[move->from] % 16 == moonfish_pawn)
{if (from_x != to_x)
--
⑨