ref: c742035599091e6c9a19990a5c3437f4c3ca388c
parent: 4fec6d8c2adf20b766afa30609633df0524b9f17
author: zamfofex <zamfofex@twdb.moe>
date: Thu Oct 12 23:35:41 EDT 2023
fix castling (again!)
--- a/chess.c
+++ b/chess.c
@@ -264,12 +264,12 @@
if (move->piece == moonfish_our_rook)
{- if (move->from == 28)
+ if (move->from == 21)
{if (chess->white) chess->castle.white_ooo = 0;
else chess->castle.black_oo = 0;
}
- if (move->from == 21)
+ if (move->from == 28)
{if (chess->white) chess->castle.white_oo = 0;
else chess->castle.black_ooo = 0;
@@ -278,15 +278,15 @@
if (move->captured == moonfish_their_rook)
{- if (move->to == 98)
- {- if (chess->white) chess->castle.black_oo = 0;
- else chess->castle.white_ooo = 0;
- }
if (move->to == 91)
{if (chess->white) chess->castle.black_ooo = 0;
else chess->castle.white_oo = 0;
+ }
+ if (move->to == 98)
+ {+ if (chess->white) chess->castle.black_oo = 0;
+ else chess->castle.white_ooo = 0;
}
}
--
⑨