fen.c: fix castling for chess960 - chess-puzzles - chess puzzle book generator | |
git clone git://git.codemadness.org/chess-puzzles | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 551d1075b050556fafd5ff8c86e0b3a92bbbda46 | |
parent bf941d069fdc94c7157de62e737e9f305a751b5b | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sat, 27 Jan 2024 21:00:45 +0100 | |
fen.c: fix castling for chess960 | |
Diffstat: | |
M fen.c | 8 ++++---- | |
1 file changed, 4 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/fen.c b/fen.c | |
@@ -1183,8 +1183,8 @@ board_playmoves(struct board *b, const char *moves) | |
if (getpiece(b, i, y2) == rookpiece) { | |
place(b, 0, x, y); /* clear pr… | |
place(b, 0, i, y2); /* clear r… | |
- place(b, rookpiece, x2 - 1, y2… | |
- place(b, piece, x2, y2); /* pl… | |
+ place(b, rookpiece, 5, y2); /*… | |
+ place(b, piece, 6, y2); /* pla… | |
x2 = i; /* update square for h… | |
break; | |
} | |
@@ -1196,8 +1196,8 @@ board_playmoves(struct board *b, const char *moves) | |
if (getpiece(b, i, y2) == rookpiece) { | |
place(b, 0, x, y); /* clear pr… | |
place(b, 0, i, y2); /* clear r… | |
- place(b, rookpiece, x2 + 1, y2… | |
- place(b, piece, x2, y2); /* pl… | |
+ place(b, rookpiece, 3, y2); /*… | |
+ place(b, piece, 2, y2); /* pla… | |
x2 = i; /* update square for h… | |
break; | |
} |