chess-puzzles, branch HEADchess puzzle book generator
f6061bfecd18263a16740fc9e7d5963256067acc2026-01-09T17:40:40Z2026-01-09T17:40:40Zpedantic fix: "is in check" for illegal king positionHiltjo Posthumahiltjo@codemadness.orgcommit f6061bfecd18263a16740fc9e7d5963256067acc
parent aef0f99f15006e8c8866938af32cebb8bb8ea7bf
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 9 Jan 2026 18:40:40 +0100
pedantic fix: "is in check" for illegal king position
Check the first king that is in check depending on who's side it is to play.
This tests for an illegal king position which is of course illegal.
Test with only white kings used to be in check/highlighted (fixed now):
./fen -o tty '8/1KK2KK1/1KK2KK1/8/3PP3/P6P/1P4P1/2PPPP2 w - - 0 1'
./fen -o tty '8/1Kk2KK1/1KK2KK1/8/3PP3/P6P/1P4P1/2PPPP2 w - - 0 1'
./fen -o tty '8/1Kk2KK1/1KK2KK1/8/3PP3/P6P/1P4P1/2PPPP2 b - - 0 1'
aef0f99f15006e8c8866938af32cebb8bb8ea7bf2025-07-24T11:09:43Z2025-07-24T11:09:43Zfen.c: add "print" theme, suitable for black and white printersHiltjo Posthumahiltjo@codemadness.orgcommit aef0f99f15006e8c8866938af32cebb8bb8ea7bf
parent e2267c734e12d3cccd80d6314d9d21bb31584bc5
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 24 Jul 2025 13:09:43 +0200
fen.c: add "print" theme, suitable for black and white printers
... or ereaders, etc.
e2267c734e12d3cccd80d6314d9d21bb31584bc52025-07-22T14:00:03Z2025-07-22T14:00:03Zbump LICENSE yearHiltjo Posthumahiltjo@codemadness.orgcommit e2267c734e12d3cccd80d6314d9d21bb31584bc5
parent a3b62d1145d314c0743fead2285f33326afeb263
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 22 Jul 2025 16:00:03 +0200
bump LICENSE year
a3b62d1145d314c0743fead2285f33326afeb2632025-07-22T13:58:43Z2025-07-22T13:58:43Zfen.c: for tty output show the indicator on the side to move, just like SVGHiltjo Posthumahiltjo@codemadness.orgcommit a3b62d1145d314c0743fead2285f33326afeb263
parent 340135cbaf1e942bafaa617b805aef4090601555
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 22 Jul 2025 15:58:43 +0200
fen.c: for tty output show the indicator on the side to move, just like SVG
340135cbaf1e942bafaa617b805aef40906015552025-07-22T13:27:47Z2025-07-22T13:28:08Zfen.c: tiny cleanup, rm 1 lineHiltjo Posthumahiltjo@codemadness.orgcommit 340135cbaf1e942bafaa617b805aef4090601555
parent 207a970e589950d41fe4512c6687131f5ed60e82
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 22 Jul 2025 15:27:47 +0200
fen.c: tiny cleanup, rm 1 line
207a970e589950d41fe4512c6687131f5ed60e822025-07-22T13:25:00Z2025-07-22T13:25:00Zfen.c: add option to show side indicator to CGI mode tooHiltjo Posthumahiltjo@codemadness.orgcommit 207a970e589950d41fe4512c6687131f5ed60e82
parent fea5413be3348ec3c167a10fcc0820a50d0d070e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 22 Jul 2025 15:25:00 +0200
fen.c: add option to show side indicator to CGI mode too
fea5413be3348ec3c167a10fcc0820a50d0d070e2025-07-22T13:19:49Z2025-07-22T13:19:49Zfen.c: add an -s and -S option to show a move indicator on the boardHiltjo Posthumahiltjo@codemadness.orgcommit fea5413be3348ec3c167a10fcc0820a50d0d070e
parent c7fb7a700cbaa565d988cfb7e49f25c85159648f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 22 Jul 2025 15:19:49 +0200
fen.c: add an -s and -S option to show a move indicator on the board
... also a fix: add -h and -H to usage, it was missing.
c7fb7a700cbaa565d988cfb7e49f25c85159648f2025-07-22T13:14:03Z2025-07-22T13:14:03Zcleanup: ModeCGI is unusedHiltjo Posthumahiltjo@codemadness.orgcommit c7fb7a700cbaa565d988cfb7e49f25c85159648f
parent aba286b23210523ed76e012d608c3e09c65e9dad
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 22 Jul 2025 15:14:03 +0200
cleanup: ModeCGI is unused
aba286b23210523ed76e012d608c3e09c65e9dad2025-03-09T09:47:03Z2025-03-09T09:47:03Zimprove some commentsHiltjo Posthumahiltjo@codemadness.orgcommit aba286b23210523ed76e012d608c3e09c65e9dad
parent d30b443f23a15ffab12f6a00931d979b9cfab061
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 9 Mar 2025 10:47:03 +0100
improve some comments
d30b443f23a15ffab12f6a00931d979b9cfab0612025-03-09T09:46:12Z2025-03-09T09:46:12Zdo not use ctype functionsHiltjo Posthumahiltjo@codemadness.orgcommit d30b443f23a15ffab12f6a00931d979b9cfab061
parent 07c37ef3931e33b55aebe2561ed92d37735cabe8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 9 Mar 2025 10:46:12 +0100
do not use ctype functions
These can be locale-specific on some platforms.
07c37ef3931e33b55aebe2561ed92d37735cabe82024-06-11T22:28:12Z2024-06-11T22:28:12Ztests.sh: add a few more tests for ambigous moves (files and ranks)Hiltjo Posthumahiltjo@codemadness.orgcommit 07c37ef3931e33b55aebe2561ed92d37735cabe8
parent 887918beab1aba026f2c228bb8ef770d420d338e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 12 Jun 2024 00:28:12 +0200
tests.sh: add a few more tests for ambigous moves (files and ranks)
887918beab1aba026f2c228bb8ef770d420d338e2024-06-11T13:42:26Z2024-06-11T13:44:25Zfix notating files and rank for piece movesHiltjo Posthumahiltjo@codemadness.orgcommit 887918beab1aba026f2c228bb8ef770d420d338e
parent 32c2e6a2c44fba3b0242123894dcacf79f59578f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 11 Jun 2024 15:42:26 +0200
fix notating files and rank for piece moves
Do not notate files and ranks for pawn moves (requires only file).
Do not allow to output the same file twice.
32c2e6a2c44fba3b0242123894dcacf79f59578f2024-06-11T13:41:46Z2024-06-11T13:44:25Zfix incorrect check of enpassant square (x -> y) for checks/checkmateHiltjo Posthumahiltjo@codemadness.orgcommit 32c2e6a2c44fba3b0242123894dcacf79f59578f
parent 13632b938c00ed21681a7bde25d8c119666524b8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 11 Jun 2024 15:41:46 +0200
fix incorrect check of enpassant square (x -> y) for checks/checkmate
13632b938c00ed21681a7bde25d8c119666524b82024-06-11T13:41:20Z2024-06-11T13:44:22Zadd 2 tests and log errors to stderrHiltjo Posthumahiltjo@codemadness.orgcommit 13632b938c00ed21681a7bde25d8c119666524b8
parent b157d49005e4d9fd2e5e979b72a1e222e21fdec3
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 11 Jun 2024 15:41:20 +0200
add 2 tests and log errors to stderr
b157d49005e4d9fd2e5e979b72a1e222e21fdec32024-02-29T18:02:30Z2024-02-29T18:02:30Zadd option to not highlight the last played move or checks or checkmatesHiltjo Posthumahiltjo@codemadness.orgcommit b157d49005e4d9fd2e5e979b72a1e222e21fdec3
parent 52d9636da4a82de476f21b1c61de8b7570f96c92
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 29 Feb 2024 19:02:30 +0100
add option to not highlight the last played move or checks or checkmates
This is better for puzzles/training. Sometimes the last played move gives a
hint of a blunder etc.
This adds an extra challenge to analyze more properties of the position.
52d9636da4a82de476f21b1c61de8b7570f96c922024-01-31T20:09:22Z2024-01-31T20:09:22Zadd love theme and valentine puzzlesHiltjo Posthumahiltjo@codemadness.orgcommit 52d9636da4a82de476f21b1c61de8b7570f96c92
parent 208dbcea3dd150fb2eb4ef1a8469acf9df2940ab
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 31 Jan 2024 21:09:22 +0100
add love theme and valentine puzzles
208dbcea3dd150fb2eb4ef1a8469acf9df2940ab2024-01-28T12:24:42Z2024-01-28T12:24:42Zremove TODOHiltjo Posthumahiltjo@codemadness.orgcommit 208dbcea3dd150fb2eb4ef1a8469acf9df2940ab
parent 8f1c842cc8cc6ef6a5b8f6020a94d54a83f21542
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 28 Jan 2024 13:24:42 +0100
remove TODO
8f1c842cc8cc6ef6a5b8f6020a94d54a83f215422024-01-28T12:23:20Z2024-01-28T12:23:20Ztests.sh: remove duplicate tested entriesHiltjo Posthumahiltjo@codemadness.orgcommit 8f1c842cc8cc6ef6a5b8f6020a94d54a83f21542
parent 4edab675e79782ae15324c3a890c87068521b999
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 28 Jan 2024 13:23:20 +0100
tests.sh: remove duplicate tested entries
4edab675e79782ae15324c3a890c87068521b9992024-01-27T20:02:21Z2024-01-27T20:02:21Ztest all possible castling positionsHiltjo Posthumahiltjo@codemadness.orgcommit 4edab675e79782ae15324c3a890c87068521b999
parent 551d1075b050556fafd5ff8c86e0b3a92bbbda46
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Jan 2024 21:02:21 +0100
test all possible castling positions
Castling is perfect now, except for illegal UCI moves.
551d1075b050556fafd5ff8c86e0b3a92bbbda462024-01-27T20:00:45Z2024-01-27T20:00:45Zfen.c: fix castling for chess960Hiltjo Posthumahiltjo@codemadness.orgcommit 551d1075b050556fafd5ff8c86e0b3a92bbbda46
parent bf941d069fdc94c7157de62e737e9f305a751b5b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Jan 2024 21:00:45 +0100
fen.c: fix castling for chess960
bf941d069fdc94c7157de62e737e9f305a751b5b2024-01-27T19:22:18Z2024-01-27T19:22:18Zinitial stub for new castling testsHiltjo Posthumahiltjo@codemadness.orgcommit bf941d069fdc94c7157de62e737e9f305a751b5b
parent 78e1ed61ec461637e664b9527f002e232f30ca6e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Jan 2024 20:22:18 +0100
initial stub for new castling tests
78e1ed61ec461637e664b9527f002e232f30ca6e2024-01-22T19:28:16Z2024-01-22T19:28:16Zsome improvementsHiltjo Posthumahiltjo@codemadness.orgcommit 78e1ed61ec461637e664b9527f002e232f30ca6e
parent e62dd220612aaada2231586e9c00845700bf4949
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 20:28:16 +0100
some improvements
- be less strict about parsing UCI moves, just space-separated
- add script to quickly convert PGN to gif, using pgn-extract.
- improve some comments.
- move scripts to root dir.
e62dd220612aaada2231586e9c00845700bf49492024-01-22T18:56:19Z2024-01-22T18:56:19Ztests.sh: add a few more castle testsHiltjo Posthumahiltjo@codemadness.orgcommit e62dd220612aaada2231586e9c00845700bf4949
parent bcb9d6c7bd496cd907cd960f599eb8d19730973d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 19:56:19 +0100
tests.sh: add a few more castle tests
update TODO
bcb9d6c7bd496cd907cd960f599eb8d19730973d2024-01-22T18:42:53Z2024-01-22T18:42:53Zdocs: archive table with chess960 starting positionsHiltjo Posthumahiltjo@codemadness.orgcommit bcb9d6c7bd496cd907cd960f599eb8d19730973d
parent 3ee1d913ba6bcafbf4647c86d45aaf958954793e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 19:42:53 +0100
docs: archive table with chess960 starting positions
3ee1d913ba6bcafbf4647c86d45aaf958954793e2024-01-22T18:28:32Z2024-01-22T18:28:32Zadd a separate script to generate a gif or tty animation from FEN + movesHiltjo Posthumahiltjo@codemadness.orgcommit 3ee1d913ba6bcafbf4647c86d45aaf958954793e
parent 5bf484cc8a074778fe73a54541288119dd207822
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 19:28:32 +0100
add a separate script to generate a gif or tty animation from FEN + moves
5bf484cc8a074778fe73a54541288119dd2078222024-01-22T00:36:43Z2024-01-22T00:36:43Zfen.c: improve more subtle things in chess960 castlingHiltjo Posthumahiltjo@codemadness.orgcommit 5bf484cc8a074778fe73a54541288119dd207822
parent 34e46a6fdd7cddde422a6b75c285879951d540e9
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 01:36:43 +0100
fen.c: improve more subtle things in chess960 castling
34e46a6fdd7cddde422a6b75c285879951d540e92024-01-22T00:09:24Z2024-01-22T00:09:24Zgenerate.sh: fix to detect possible rook promotion and support uppercaseHiltjo Posthumahiltjo@codemadness.orgcommit 34e46a6fdd7cddde422a6b75c285879951d540e9
parent 0dcd2f065cb678018fb2e30055550987705a09c5
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 01:09:24 +0100
generate.sh: fix to detect possible rook promotion and support uppercase
0dcd2f065cb678018fb2e30055550987705a09c52024-01-22T00:07:15Z2024-01-22T00:07:27Ztests.sh: add some more castling and chess960 PGN testsHiltjo Posthumahiltjo@codemadness.orgcommit 0dcd2f065cb678018fb2e30055550987705a09c5
parent 14096028aee533f132200b020687e1ce3884105b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 01:07:15 +0100
tests.sh: add some more castling and chess960 PGN tests
14096028aee533f132200b020687e1ce3884105b2024-01-22T00:04:59Z2024-01-22T00:07:25Zfen.c: simplify castling codeHiltjo Posthumahiltjo@codemadness.orgcommit 14096028aee533f132200b020687e1ce3884105b
parent 3ccf4d4450965cc2853d9cbc8b81b75cfd44660a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 01:04:59 +0100
fen.c: simplify castling code
3ccf4d4450965cc2853d9cbc8b81b75cfd44660a2024-01-21T23:55:15Z2024-01-21T23:55:15Zfen.c: fix highlight square when castlingHiltjo Posthumahiltjo@codemadness.orgcommit 3ccf4d4450965cc2853d9cbc8b81b75cfd44660a
parent 7915ffd10d87934201c751632a4e1dd4c3cb65cb
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 00:55:15 +0100
fen.c: fix highlight square when castling
7915ffd10d87934201c751632a4e1dd4c3cb65cb2024-01-21T23:55:02Z2024-01-21T23:55:02Zfen.c: improve castling with chess960Hiltjo Posthumahiltjo@codemadness.orgcommit 7915ffd10d87934201c751632a4e1dd4c3cb65cb
parent 37c4fe7bb023a2537fd8221042a9b62086c6532b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 22 Jan 2024 00:55:02 +0100
fen.c: improve castling with chess960
37c4fe7bb023a2537fd8221042a9b62086c6532b2024-01-14T19:30:56Z2024-01-14T19:30:56Zfen.c: fix a typoHiltjo Posthumahiltjo@codemadness.orgcommit 37c4fe7bb023a2537fd8221042a9b62086c6532b
parent 62500fd8c67b353a43bad026d0f730eccbd90b47
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 14 Jan 2024 20:30:56 +0100
fen.c: fix a typo
62500fd8c67b353a43bad026d0f730eccbd90b472024-01-14T18:23:25Z2024-01-14T18:23:25Zimprove documentation and reference the pgn-extract toolHiltjo Posthumahiltjo@codemadness.orgcommit 62500fd8c67b353a43bad026d0f730eccbd90b47
parent e34a8cc5befa1d22f9468bb9169113acb84ef6f8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 14 Jan 2024 19:23:25 +0100
improve documentation and reference the pgn-extract tool
e34a8cc5befa1d22f9468bb9169113acb84ef6f82024-01-14T18:17:10Z2024-01-14T18:17:10Ztest.sh: add more promotion tests and fixup for case if input is incorrectHiltjo Posthumahiltjo@codemadness.orgcommit e34a8cc5befa1d22f9468bb9169113acb84ef6f8
parent a7b46089306de698b20b0400a8ec9f3ccda3f729
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 14 Jan 2024 19:17:10 +0100
test.sh: add more promotion tests and fixup for case if input is incorrect
a7b46089306de698b20b0400a8ec9f3ccda3f7292024-01-14T18:09:38Z2024-01-14T18:09:38Zfen.c: fix promotion to rook, fix regression in promotion and PGN output for itHiltjo Posthumahiltjo@codemadness.orgcommit a7b46089306de698b20b0400a8ec9f3ccda3f729
parent c569951f00bbd5517962401c1f090cac6a99a8c5
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 14 Jan 2024 19:09:38 +0100
fen.c: fix promotion to rook, fix regression in promotion and PGN output for it
c569951f00bbd5517962401c1f090cac6a99a8c52024-01-08T21:01:09Z2024-01-08T21:03:56Zupdate TODOHiltjo Posthumahiltjo@codemadness.orgcommit c569951f00bbd5517962401c1f090cac6a99a8c5
parent 79add5ed63f4c15703b14bfa3209d5046f8ebb3f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 8 Jan 2024 22:01:09 +0100
update TODO
79add5ed63f4c15703b14bfa3209d5046f8ebb3f2024-01-08T20:55:31Z2024-01-08T21:03:56Zfen.c: remove unneccesary checkHiltjo Posthumahiltjo@codemadness.orgcommit 79add5ed63f4c15703b14bfa3209d5046f8ebb3f
parent abc52654a913253417dcd329cf70a975f8674dd6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 8 Jan 2024 21:55:31 +0100
fen.c: remove unneccesary check
abc52654a913253417dcd329cf70a975f8674dd62024-01-08T20:54:24Z2024-01-08T21:03:53Zfen.c: fix invalid piece name for queenside castling for blackHiltjo Posthumahiltjo@codemadness.orgcommit abc52654a913253417dcd329cf70a975f8674dd6
parent df3a95f12df8a701ed0ad5997be6ad5c3f840bda
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 8 Jan 2024 21:54:24 +0100
fen.c: fix invalid piece name for queenside castling for black
This probably affects queenside castling for black with Chess960 and certain
combinations (rook very close next to king).
(Writing more Chess960 and castling tests is on my TODO already.)
df3a95f12df8a701ed0ad5997be6ad5c3f840bda2024-01-08T20:50:26Z2024-01-08T20:51:34Zsmall code-cleanup and add some commentsHiltjo Posthumahiltjo@codemadness.orgcommit df3a95f12df8a701ed0ad5997be6ad5c3f840bda
parent da65c61271ad6e8eb3fde5a8e828ed4d2c882fb2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 8 Jan 2024 21:50:26 +0100
small code-cleanup and add some comments
da65c61271ad6e8eb3fde5a8e828ed4d2c882fb22024-01-08T20:36:42Z2024-01-08T20:36:42Zfen.c: CGI mode: write output header before play movesHiltjo Posthumahiltjo@codemadness.orgcommit da65c61271ad6e8eb3fde5a8e828ed4d2c882fb2
parent 2037128c8c5a1527bddad29041660177a1cee999
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 8 Jan 2024 21:36:42 +0100
fen.c: CGI mode: write output header before play moves
... else PGN output will be before the header is written.
2037128c8c5a1527bddad29041660177a1cee9992024-01-08T20:36:15Z2024-01-08T20:36:15Zfen.c: CGI mode, add dutch mode parameter, will also set piece mappingHiltjo Posthumahiltjo@codemadness.orgcommit 2037128c8c5a1527bddad29041660177a1cee999
parent 5f6b743ef448f1d096d01ffafe4d112e47768a2f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 8 Jan 2024 21:36:15 +0100
fen.c: CGI mode, add dutch mode parameter, will also set piece mapping
5f6b743ef448f1d096d01ffafe4d112e47768a2f2024-01-07T14:51:17Z2024-01-07T14:51:17Ztests.sh: add 2 testsHiltjo Posthumahiltjo@codemadness.orgcommit 5f6b743ef448f1d096d01ffafe4d112e47768a2f
parent 1f750e11a33213399d0ae7f8817d52f35cc8b6b8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 7 Jan 2024 15:51:17 +0100
tests.sh: add 2 tests
1f750e11a33213399d0ae7f8817d52f35cc8b6b82024-01-06T14:40:35Z2024-01-06T14:42:33Zvarious improvements and featuresHiltjo Posthumahiltjo@codemadness.orgcommit 1f750e11a33213399d0ae7f8817d52f35cc8b6b8
parent 0fe1f6ac19819dd3954b8520db31a66f76d7cf87
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 6 Jan 2024 15:40:35 +0100
various improvements and features
... do all the things and do them meh.
- ambigous moves improvements and fixes.
- add "speak" mode, describe a move in human-like language (dutch and english).
- add -l option to only output the PGN or description of the last move, useful
for speech engines.
- FEN output: reset en passant square on checkmate (like Lichess does).
- lichess stream script: add description of the move and use espeak to say it.
- add a page of the puzzles intended for the tty (index.vt).
- index.html improvements:
- CSS tweaks to better align 2 puzzles in the center.
- hyperlink color.
- add simple plain-text listing in solutions.txt file.
- add title and alt of the solutions moves in PGN and as a description.
- tests:
- add more of them.
- return exitcode 0 or 1 on a failure.
- prefix type of test: PGN or FEN.
0fe1f6ac19819dd3954b8520db31a66f76d7cf872024-01-04T20:03:31Z2024-01-04T20:03:31Zupdate TODO and failing testsHiltjo Posthumahiltjo@codemadness.orgcommit 0fe1f6ac19819dd3954b8520db31a66f76d7cf87
parent 6554fcb56e12be089dbbf0e700f6777924e8b5b6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 4 Jan 2024 21:03:31 +0100
update TODO and failing tests
This is an edge-case to defend en passant. Fix it later.
2 tests are succeeding, but this is because it is not implemented.
6554fcb56e12be089dbbf0e700f6777924e8b5b62024-01-04T16:04:22Z2024-01-04T16:04:48Zenable output options for the CGI modeHiltjo Posthumahiltjo@codemadness.orgcommit 6554fcb56e12be089dbbf0e700f6777924e8b5b6
parent cd3acc17b7b82e112bd5abbc65324283a7c5bf7f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 4 Jan 2024 17:04:22 +0100
enable output options for the CGI mode
cd3acc17b7b82e112bd5abbc65324283a7c5bf7f2024-01-04T15:44:29Z2024-01-04T15:44:29Zvarious improvementsHiltjo Posthumahiltjo@codemadness.orgcommit cd3acc17b7b82e112bd5abbc65324283a7c5bf7f
parent f1daa80c1d6cf199c57d820e117255f38bd3d55e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 4 Jan 2024 16:44:29 +0100
various improvements
Some are:
* Colour themes.
* Initial PGN output.
* PGN piece localization.
* generate.sh: dutch localization.
* Highlight check or checkmate in red.
* Add a struct board and localize states.
* Add a CGI mode.
* Lichess example script, show more information about the players.
* Add dark mode CSS.
* Add a script to generate animated gifs for solutions.
* Documentation improvements.
* Many bugfixes.
f1daa80c1d6cf199c57d820e117255f38bd3d55e2023-12-25T17:54:16Z2023-12-25T17:54:16Zadd LEN() macro and use itHiltjo Posthumahiltjo@codemadness.orgcommit f1daa80c1d6cf199c57d820e117255f38bd3d55e
parent 6af435b4416d90cb27e447e2f0bf505721374e12
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 25 Dec 2023 18:54:16 +0100
add LEN() macro and use it
6af435b4416d90cb27e447e2f0bf505721374e122023-12-25T17:49:58Z2023-12-25T17:49:58Zadd util functions for (x,y) to (file, rank) and vice versaHiltjo Posthumahiltjo@codemadness.orgcommit 6af435b4416d90cb27e447e2f0bf505721374e12
parent b7a52ecde26555a060898faaa5643851368c7467
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 25 Dec 2023 18:49:58 +0100
add util functions for (x,y) to (file, rank) and vice versa
b7a52ecde26555a060898faaa5643851368c74672023-12-24T10:51:14Z2023-12-24T10:51:14Zfen.1: comment pgn option for now, it is disabledHiltjo Posthumahiltjo@codemadness.orgcommit b7a52ecde26555a060898faaa5643851368c7467
parent 9a70ccee5e9c5462e079304c3521c2c7640bf51d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 24 Dec 2023 11:51:14 +0100
fen.1: comment pgn option for now, it is disabled
9a70ccee5e9c5462e079304c3521c2c7640bf51d2023-12-24T10:38:26Z2023-12-24T10:38:26Zfen.c: reduce filesize of SVG furtherHiltjo Posthumahiltjo@codemadness.orgcommit 9a70ccee5e9c5462e079304c3521c2c7640bf51d
parent e536a441d52c33adea06f8ed451bd890a3ebdb9d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 24 Dec 2023 11:38:26 +0100
fen.c: reduce filesize of SVG further
Only define drawing commands for the pieces used. Reuse them for multiple
pieces.
The pawn definition is reused, but with a different fill color.
e536a441d52c33adea06f8ed451bd890a3ebdb9d2023-12-23T17:59:46Z2023-12-23T17:59:46Zfen: various code improvements, initial code for PGN output (disabled for now)Hiltjo Posthumahiltjo@codemadness.orgcommit e536a441d52c33adea06f8ed451bd890a3ebdb9d
parent 4f6db6f748b3760f1f991e46bbb37246d201d4c8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 23 Dec 2023 18:59:46 +0100
fen: various code improvements, initial code for PGN output (disabled for now)
- Reduce SVG output size by reusing the draw paths for pawns (saves ~4KB per
image on average). Of course this depends. On a board with no pawns it can be
~300 bytes larger.
- Remove Board FEN header for tty and ASCII outputs.
- Make the highlight function more generic (for one move).
- Improve outputs parsing, an invalid option now shows the usage().
- Rename the output functions to output_<outputname>().
- Add initial code for PGN output, needs some work, disabled for now.
... work in progress
4f6db6f748b3760f1f991e46bbb37246d201d4c82023-12-21T21:45:17Z2023-12-21T21:46:26Zstream_lichess.sh: read initial FEN for chess960, show white vs black nameHiltjo Posthumahiltjo@codemadness.orgcommit 4f6db6f748b3760f1f991e46bbb37246d201d4c8
parent aa7a4692fb14c40930fde876585a70a88b76b3e2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 22:45:17 +0100
stream_lichess.sh: read initial FEN for chess960, show white vs black name
aa7a4692fb14c40930fde876585a70a88b76b3e22023-12-21T21:20:34Z2023-12-21T21:38:31Zimprove tests and label themHiltjo Posthumahiltjo@codemadness.orgcommit aa7a4692fb14c40930fde876585a70a88b76b3e2
parent 35cfce88175a31ca9b1db67e70575f66182d8ab2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 22:20:34 +0100
improve tests and label them
35cfce88175a31ca9b1db67e70575f66182d8ab22023-12-21T21:19:16Z2023-12-21T21:35:51Zfen.c: improve castling for chess960Hiltjo Posthumahiltjo@codemadness.orgcommit 35cfce88175a31ca9b1db67e70575f66182d8ab2
parent cb828aa3fa341d3af5e9338132497cf49671369f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 22:19:16 +0100
fen.c: improve castling for chess960
In chess960 you can castle right next to the king also.
This is handled in the code by "taking a piece", although this is of course
your own piece.
Note that this doesn't reset the halfmove counter.
cb828aa3fa341d3af5e9338132497cf49671369f2023-12-21T19:29:26Z2023-12-21T19:29:26Zgenerate.sh: only show cursor when solutions are collapsedHiltjo Posthumahiltjo@codemadness.orgcommit cb828aa3fa341d3af5e9338132497cf49671369f
parent 10ce46bdd74256d98eec084142787f40730c582d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 20:29:26 +0100
generate.sh: only show cursor when solutions are collapsed
... not on all the puzzle solutions contained within.
10ce46bdd74256d98eec084142787f40730c582d2023-12-21T19:27:17Z2023-12-21T19:27:17Zgenerate.sh: fix last puzzles, some usability improvementsHiltjo Posthumahiltjo@codemadness.orgcommit 10ce46bdd74256d98eec084142787f40730c582d
parent 2046625e2948b915fb5f7b6244e54f79cf2c2a8a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 20:27:17 +0100
generate.sh: fix last puzzles, some usability improvements
2046625e2948b915fb5f7b6244e54f79cf2c2a8a2023-12-21T18:57:04Z2023-12-21T19:15:37Zfen.c: optimization for size: do not use true-color where its not neededHiltjo Posthumahiltjo@codemadness.orgcommit 2046625e2948b915fb5f7b6244e54f79cf2c2a8a
parent 2f8f9b16e1834cdd577d590efc51be17f3013585
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 19:57:04 +0100
fen.c: optimization for size: do not use true-color where its not needed
- Reduces file size.
- Simplify creating a checkered pattern.
2f8f9b16e1834cdd577d590efc51be17f30135852023-12-21T17:27:41Z2023-12-21T17:27:41Zfen.c: code cleanup: separate parsing FEN and moves in 2 functionsHiltjo Posthumahiltjo@codemadness.orgcommit 2f8f9b16e1834cdd577d590efc51be17f3013585
parent 752c96801f72527cf5bc3faab7ad7d1d7889ddbf
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 18:27:41 +0100
fen.c: code cleanup: separate parsing FEN and moves in 2 functions
752c96801f72527cf5bc3faab7ad7d1d7889ddbf2023-12-21T17:17:34Z2023-12-21T17:17:34Zupdate TODOHiltjo Posthumahiltjo@codemadness.orgcommit 752c96801f72527cf5bc3faab7ad7d1d7889ddbf
parent 4d582297eea29262d3ed81b786c28276e006589f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 18:17:34 +0100
update TODO
4d582297eea29262d3ed81b786c28276e006589f2023-12-21T17:15:09Z2023-12-21T17:15:09Zimprove man page documentationHiltjo Posthumahiltjo@codemadness.orgcommit 4d582297eea29262d3ed81b786c28276e006589f
parent 667fa14261d797a2c04938992a4efa5061e558a2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 18:15:09 +0100
improve man page documentation
667fa14261d797a2c04938992a4efa5061e558a22023-12-21T17:14:27Z2023-12-21T17:14:27Zgenerate.sh: improve portability and performance, use randomness using a seedHiltjo Posthumahiltjo@codemadness.orgcommit 667fa14261d797a2c04938992a4efa5061e558a2
parent b9e10f90912e4d6c82e4a4738a2fcdbd77b0d6db
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 18:14:27 +0100
generate.sh: improve portability and performance, use randomness using a seed
- Replace shuf with a custom shuffling using awk and sort -R.
- Use a random seed to generate random, but in a deterministic way.
Allows regenerating the same output (atleast on the same machine).
- Generating the puzzles is faster, tested on a machine: 10s to 3.5s
- Show an error message when the CSV database file doesn't exist yet.
b9e10f90912e4d6c82e4a4738a2fcdbd77b0d6db2023-12-21T16:58:13Z2023-12-21T16:58:13Zimprove check for castling and castling availabilityHiltjo Posthumahiltjo@codemadness.orgcommit b9e10f90912e4d6c82e4a4738a2fcdbd77b0d6db
parent 526df2437b7f656c5f7f68f207478dd2ee15db53
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 17:58:13 +0100
improve check for castling and castling availability
This improves compatibility with chess960.
526df2437b7f656c5f7f68f207478dd2ee15db532023-12-20T23:56:37Z2023-12-20T23:56:37Ztty output: remove some unneeded/double escape codesHiltjo Posthumahiltjo@codemadness.orgcommit 526df2437b7f656c5f7f68f207478dd2ee15db53
parent 7ec50aca8a290c15c92a71fde6dc99977330ea10
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 00:56:37 +0100
tty output: remove some unneeded/double escape codes
7ec50aca8a290c15c92a71fde6dc99977330ea102023-12-20T23:48:01Z2023-12-20T23:48:01Zupdate READMEHiltjo Posthumahiltjo@codemadness.orgcommit 7ec50aca8a290c15c92a71fde6dc99977330ea10
parent 1a4ecae770df28922372ddc0a2e60cc173237a68
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 00:48:01 +0100
update README
1a4ecae770df28922372ddc0a2e60cc173237a682023-12-20T23:38:18Z2023-12-20T23:38:18Zfen.1: fix a typoHiltjo Posthumahiltjo@codemadness.orgcommit 1a4ecae770df28922372ddc0a2e60cc173237a68
parent 377132fbd774962230e6980b376de721f2ec467e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 00:38:18 +0100
fen.1: fix a typo
377132fbd774962230e6980b376de721f2ec467e2023-12-20T23:33:07Z2023-12-20T23:36:50Zupdate TODOHiltjo Posthumahiltjo@codemadness.orgcommit 377132fbd774962230e6980b376de721f2ec467e
parent 0d2f03825dce77e698f85d349ff7d35e72031f6d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 00:33:07 +0100
update TODO
0d2f03825dce77e698f85d349ff7d35e72031f6d2023-12-20T23:32:41Z2023-12-20T23:36:50Zimprove tty board border size a bitHiltjo Posthumahiltjo@codemadness.orgcommit 0d2f03825dce77e698f85d349ff7d35e72031f6d
parent d3c8592f3761018e4fac3ba37503f432cb1dda1f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 00:32:41 +0100
improve tty board border size a bit
d3c8592f3761018e4fac3ba37503f432cb1dda1f2023-12-20T23:24:03Z2023-12-20T23:36:46Zadd a script to stream a lichess game using the FEN tty outputHiltjo Posthumahiltjo@codemadness.orgcommit d3c8592f3761018e4fac3ba37503f432cb1dda1f
parent 528629a967639e013c56fee9c293b7b87376d15e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 00:24:03 +0100
add a script to stream a lichess game using the FEN tty output
528629a967639e013c56fee9c293b7b87376d15e2023-12-20T23:20:34Z2023-12-20T23:20:34Zfen.1: add initial man pageHiltjo Posthumahiltjo@codemadness.orgcommit 528629a967639e013c56fee9c293b7b87376d15e
parent 212c82b75fc13feab19a991ac284ab92e3c352ff
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 21 Dec 2023 00:20:34 +0100
fen.1: add initial man page
212c82b75fc13feab19a991ac284ab92e3c352ff2023-12-20T22:55:54Z2023-12-20T22:55:54Zen passant should reset halfmove counterHiltjo Posthumahiltjo@codemadness.orgcommit 212c82b75fc13feab19a991ac284ab92e3c352ff
parent 10e231516543327f556abc8b73c31c1e114ede48
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 23:55:54 +0100
en passant should reset halfmove counter
Add this test separately, just in case.
10e231516543327f556abc8b73c31c1e114ede482023-12-20T22:53:58Z2023-12-20T22:53:58Zfix a bug in FEN en passant parsing, handle en passant takesHiltjo Posthumahiltjo@codemadness.orgcommit 10e231516543327f556abc8b73c31c1e114ede48
parent f2415a87c11df764bacefa67d70efd1c57bd66ff
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 23:53:58 +0100
fix a bug in FEN en passant parsing, handle en passant takes
Add a few tests for them.
f2415a87c11df764bacefa67d70efd1c57bd66ff2023-12-20T21:46:22Z2023-12-20T21:46:22Zupdate READMEHiltjo Posthumahiltjo@codemadness.orgcommit f2415a87c11df764bacefa67d70efd1c57bd66ff
parent d9c1c31debf454d25aaebc6eb90a2bca3e1eb52e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 22:46:22 +0100
update README
d9c1c31debf454d25aaebc6eb90a2bca3e1eb52e2023-12-20T21:39:53Z2023-12-20T21:39:53Zfix typo and compile errorHiltjo Posthumahiltjo@codemadness.orgcommit d9c1c31debf454d25aaebc6eb90a2bca3e1eb52e
parent e1243f806a094c73adcc8bb2dd8633ff852ba1e4
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 22:39:53 +0100
fix typo and compile error
Tested on OpenBSD.
e1243f806a094c73adcc8bb2dd8633ff852ba1e42023-12-20T21:37:40Z2023-12-20T21:37:40Zadd TODOHiltjo Posthumahiltjo@codemadness.orgcommit e1243f806a094c73adcc8bb2dd8633ff852ba1e4
parent a749e990b529966883178e9cfe8ebfc6faec25b4
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 22:37:40 +0100
add TODO
a749e990b529966883178e9cfe8ebfc6faec25b42023-12-20T21:32:00Z2023-12-20T21:37:05Zflip puzzles if its black to moveHiltjo Posthumahiltjo@codemadness.orgcommit a749e990b529966883178e9cfe8ebfc6faec25b4
parent b50c708ac5b44591b62aaa443022625c3fdd44cb
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 22:32:00 +0100
flip puzzles if its black to move
b50c708ac5b44591b62aaa443022625c3fdd44cb2023-12-20T21:31:43Z2023-12-20T21:31:43Zcommand-line parsing for formats, add OpenBSD pledgeHiltjo Posthumahiltjo@codemadness.orgcommit b50c708ac5b44591b62aaa443022625c3fdd44cb
parent 3d921c8e0e2011ae994e508e89fc71086fffd598
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 22:31:43 +0100
command-line parsing for formats, add OpenBSD pledge
3d921c8e0e2011ae994e508e89fc71086fffd5982023-12-20T20:54:11Z2023-12-20T20:54:11Zoption to flip the boardHiltjo Posthumahiltjo@codemadness.orgcommit 3d921c8e0e2011ae994e508e89fc71086fffd598
parent 3c9f4a2be304b3f0d197d69bea715ee0c9e29570
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 21:54:11 +0100
option to flip the board
3c9f4a2be304b3f0d197d69bea715ee0c9e295702023-12-20T20:16:57Z2023-12-20T20:16:57Zremove double unneccesary resetHiltjo Posthumahiltjo@codemadness.orgcommit 3c9f4a2be304b3f0d197d69bea715ee0c9e29570
parent cbf34cae81cb9545e3854c19eb15040f106ab02f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 21:16:57 +0100
remove double unneccesary reset
cbf34cae81cb9545e3854c19eb15040f106ab02f2023-12-20T20:16:42Z2023-12-20T20:16:42Zmake it easier to change the color theme for svg and ttyHiltjo Posthumahiltjo@codemadness.orgcommit cbf34cae81cb9545e3854c19eb15040f106ab02f
parent b55e73ad95fbbe333cdac344ca25a84dc61151b0
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 21:16:42 +0100
make it easier to change the color theme for svg and tty
b55e73ad95fbbe333cdac344ca25a84dc61151b02023-12-20T20:07:30Z2023-12-20T20:07:30Zslightly improve ascii output for colored squares and highlighted squaresHiltjo Posthumahiltjo@codemadness.orgcommit b55e73ad95fbbe333cdac344ca25a84dc61151b0
parent 64c4e3aaecf348c2cb7c61f5569cae1a820d20db
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 21:07:30 +0100
slightly improve ascii output for colored squares and highlighted squares
64c4e3aaecf348c2cb7c61f5569cae1a820d20db2023-12-20T19:35:16Z2023-12-20T19:35:16Zdetect en passant, add some tests for itHiltjo Posthumahiltjo@codemadness.orgcommit 64c4e3aaecf348c2cb7c61f5569cae1a820d20db
parent d69d3ff1075f952ebdd45af40e7580bb3003721f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 20:35:16 +0100
detect en passant, add some tests for it
d69d3ff1075f952ebdd45af40e7580bb3003721f2023-12-20T19:19:55Z2023-12-20T19:19:55Zremove the ability to castle when the king or rook movesHiltjo Posthumahiltjo@codemadness.orgcommit d69d3ff1075f952ebdd45af40e7580bb3003721f
parent a0e61726e8e522f6731e6eb27e18856f4fde61fb
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 20:19:55 +0100
remove the ability to castle when the king or rook moves
a0e61726e8e522f6731e6eb27e18856f4fde61fb2023-12-20T19:19:38Z2023-12-20T19:19:38Zfix incorrect (x,y) parameters for taking a pieceHiltjo Posthumahiltjo@codemadness.orgcommit a0e61726e8e522f6731e6eb27e18856f4fde61fb
parent 4ccd78674dc439a488331c561af552b0b129d621
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 20:19:38 +0100
fix incorrect (x,y) parameters for taking a piece
4ccd78674dc439a488331c561af552b0b129d6212023-12-20T19:19:08Z2023-12-20T19:19:08Zexpand tests for castling etcHiltjo Posthumahiltjo@codemadness.orgcommit 4ccd78674dc439a488331c561af552b0b129d621
parent 732bc42efda65c2ecc30a416f20516b9fcca62f6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 20:19:08 +0100
expand tests for castling etc
732bc42efda65c2ecc30a416f20516b9fcca62f62023-12-20T18:30:21Z2023-12-20T18:30:21Zadd a useful reference about the PGN and FEN formats etcHiltjo Posthumahiltjo@codemadness.orgcommit 732bc42efda65c2ecc30a416f20516b9fcca62f6
parent 53bf056699cba0e1bd1b06260600385ac5ad0780
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 19:30:21 +0100
add a useful reference about the PGN and FEN formats etc
From archive.org
53bf056699cba0e1bd1b06260600385ac5ad07802023-12-20T18:29:59Z2023-12-20T18:29:59Zadd initial testsHiltjo Posthumahiltjo@codemadness.orgcommit 53bf056699cba0e1bd1b06260600385ac5ad0780
parent aaac499d48085948814415956d3eb4ded33eb704
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 19:29:59 +0100
add initial tests
To make it easier to test the parser and moves
aaac499d48085948814415956d3eb4ded33eb7042023-12-20T18:26:30Z2023-12-20T18:26:30Zwhen moving the king or castling remove the ability to castleHiltjo Posthumahiltjo@codemadness.orgcommit aaac499d48085948814415956d3eb4ded33eb704
parent dab21427a28e5561843d56cb4de324cddd4c53c7
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 19:26:30 +0100
when moving the king or castling remove the ability to castle
+ a pedantic ctype fix.
dab21427a28e5561843d56cb4de324cddd4c53c72023-12-20T18:26:23Z2023-12-20T18:26:23Zimprove move number parsingHiltjo Posthumahiltjo@codemadness.orgcommit dab21427a28e5561843d56cb4de324cddd4c53c7
parent 30a2ab3dd2979115341beaedc6d4a4918541036a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 19:26:23 +0100
improve move number parsing
30a2ab3dd2979115341beaedc6d4a4918541036a2023-12-20T17:50:33Z2023-12-20T17:50:33Zadd OnlyFENs output option for the current board stateHiltjo Posthumahiltjo@codemadness.orgcommit 30a2ab3dd2979115341beaedc6d4a4918541036a
parent 0bf730b426ada19f487f1791faf13269989abc04
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 18:50:33 +0100
add OnlyFENs output option for the current board state
Maybe I'll use this for automatic testing later
0bf730b426ada19f487f1791faf13269989abc042023-12-20T17:50:17Z2023-12-20T17:50:17Zmake command-line arguments more flexibleHiltjo Posthumahiltjo@codemadness.orgcommit 0bf730b426ada19f487f1791faf13269989abc04
parent 132c4a50aae9c410bf3b505f4c61b322c388cf83
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Dec 2023 18:50:17 +0100
make command-line arguments more flexible
132c4a50aae9c410bf3b505f4c61b322c388cf832023-12-19T19:11:09Z2023-12-19T19:11:09Zimprove and extend FEN parsing and FEN outputHiltjo Posthumahiltjo@codemadness.orgcommit 132c4a50aae9c410bf3b505f4c61b322c388cf83
parent 29822d687c7eed634e2fd6b480ddbf84cbabf4c2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 19 Dec 2023 20:11:09 +0100
improve and extend FEN parsing and FEN output
- improve castling availability: no castle detection yet.
- initial halfmove and move number parsing.
- parse enpassant move, but no enpassant detection yet.
- increase move number by a move by black.
work in progress
29822d687c7eed634e2fd6b480ddbf84cbabf4c22023-12-18T23:50:04Z2023-12-18T23:50:04ZREADME: update filenamesHiltjo Posthumahiltjo@codemadness.orgcommit 29822d687c7eed634e2fd6b480ddbf84cbabf4c2
parent d7273cde403340578a406a58fc419ae03277a84f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 19 Dec 2023 00:50:04 +0100
README: update filenames
d7273cde403340578a406a58fc419ae03277a84f2023-12-18T23:49:17Z2023-12-18T23:49:17Zmerge code together, symlink binariesHiltjo Posthumahiltjo@codemadness.orgcommit d7273cde403340578a406a58fc419ae03277a84f
parent 318de62766d2fd0caa0594f939cd1b2d9d143e0a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 19 Dec 2023 00:49:17 +0100
merge code together, symlink binaries
318de62766d2fd0caa0594f939cd1b2d9d143e0a2023-12-18T23:33:27Z2023-12-18T23:33:27Zallow "startpos" for FEN for the starting positionHiltjo Posthumahiltjo@codemadness.orgcommit 318de62766d2fd0caa0594f939cd1b2d9d143e0a
parent d1450a9bf4d9b009733094038420a82a6872a8ae
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 19 Dec 2023 00:33:27 +0100
allow "startpos" for FEN for the starting position
d1450a9bf4d9b009733094038420a82a6872a8ae2023-12-18T23:31:55Z2023-12-18T23:31:55Zimplement detecting castling for movesHiltjo Posthumahiltjo@codemadness.orgcommit d1450a9bf4d9b009733094038420a82a6872a8ae
parent 09a541233ed6f1abf9f4498b37d1281a78f65ce8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 19 Dec 2023 00:31:55 +0100
implement detecting castling for moves
09a541233ed6f1abf9f4498b37d1281a78f65ce82023-12-18T23:31:34Z2023-12-18T23:31:34Zseparate function to check a valid piece characterHiltjo Posthumahiltjo@codemadness.orgcommit 09a541233ed6f1abf9f4498b37d1281a78f65ce8
parent 5df80ee4eebb2000bcac5530f58e6c84e9b92818
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 19 Dec 2023 00:31:34 +0100
separate function to check a valid piece character
5df80ee4eebb2000bcac5530f58e6c84e9b928182023-12-18T21:16:22Z2023-12-18T21:16:22Zgenerate.sh: add initial solutions/spoiler pageHiltjo Posthumahiltjo@codemadness.orgcommit 5df80ee4eebb2000bcac5530f58e6c84e9b92818
parent 098952703cf713b7569ae0cb826a08a239e3b46a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 18 Dec 2023 22:16:22 +0100
generate.sh: add initial solutions/spoiler page
098952703cf713b7569ae0cb826a08a239e3b46a2023-12-18T21:15:46Z2023-12-18T21:15:46Zfen_to_*.c: handle possible piece promotion for movesHiltjo Posthumahiltjo@codemadness.orgcommit 098952703cf713b7569ae0cb826a08a239e3b46a
parent b8fe22e0b3297f81eca81b3c5ad8f2fd7e918c38
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 18 Dec 2023 22:15:46 +0100
fen_to_*.c: handle possible piece promotion for moves
b8fe22e0b3297f81eca81b3c5ad8f2fd7e918c382023-12-18T14:55:04Z2023-12-18T14:55:04Zfen_to_tty: make showcoords = 0 work properlyHiltjo Posthumahiltjo@codemadness.orgcommit b8fe22e0b3297f81eca81b3c5ad8f2fd7e918c38
parent 26d727fe71a7e77b2eb1f733e2ad738b52089c54
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 18 Dec 2023 15:55:04 +0100
fen_to_tty: make showcoords = 0 work properly
26d727fe71a7e77b2eb1f733e2ad738b52089c542023-12-18T14:51:15Z2023-12-18T14:52:49Zfen_to_tty: add initial tty versionHiltjo Posthumahiltjo@codemadness.orgcommit 26d727fe71a7e77b2eb1f733e2ad738b52089c54
parent 59753af31b403f30db84f07562d2614460a2d9ab
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 18 Dec 2023 15:51:15 +0100
fen_to_tty: add initial tty version