chess-puzzles, branch HEAD chess puzzle book generator f6061bfecd18263a16740fc9e7d5963256067acc 2026-01-09T17:40:40Z 2026-01-09T17:40:40Z pedantic fix: "is in check" for illegal king position Hiltjo Posthuma hiltjo@codemadness.org commit 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' aef0f99f15006e8c8866938af32cebb8bb8ea7bf 2025-07-24T11:09:43Z 2025-07-24T11:09:43Z fen.c: add "print" theme, suitable for black and white printers Hiltjo Posthuma hiltjo@codemadness.org commit 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. e2267c734e12d3cccd80d6314d9d21bb31584bc5 2025-07-22T14:00:03Z 2025-07-22T14:00:03Z bump LICENSE year Hiltjo Posthuma hiltjo@codemadness.org commit e2267c734e12d3cccd80d6314d9d21bb31584bc5 parent a3b62d1145d314c0743fead2285f33326afeb263 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 22 Jul 2025 16:00:03 +0200 bump LICENSE year a3b62d1145d314c0743fead2285f33326afeb263 2025-07-22T13:58:43Z 2025-07-22T13:58:43Z fen.c: for tty output show the indicator on the side to move, just like SVG Hiltjo Posthuma hiltjo@codemadness.org commit 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 340135cbaf1e942bafaa617b805aef4090601555 2025-07-22T13:27:47Z 2025-07-22T13:28:08Z fen.c: tiny cleanup, rm 1 line Hiltjo Posthuma hiltjo@codemadness.org commit 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 207a970e589950d41fe4512c6687131f5ed60e82 2025-07-22T13:25:00Z 2025-07-22T13:25:00Z fen.c: add option to show side indicator to CGI mode too Hiltjo Posthuma hiltjo@codemadness.org commit 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 fea5413be3348ec3c167a10fcc0820a50d0d070e 2025-07-22T13:19:49Z 2025-07-22T13:19:49Z fen.c: add an -s and -S option to show a move indicator on the board Hiltjo Posthuma hiltjo@codemadness.org commit 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. c7fb7a700cbaa565d988cfb7e49f25c85159648f 2025-07-22T13:14:03Z 2025-07-22T13:14:03Z cleanup: ModeCGI is unused Hiltjo Posthuma hiltjo@codemadness.org commit c7fb7a700cbaa565d988cfb7e49f25c85159648f parent aba286b23210523ed76e012d608c3e09c65e9dad Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 22 Jul 2025 15:14:03 +0200 cleanup: ModeCGI is unused aba286b23210523ed76e012d608c3e09c65e9dad 2025-03-09T09:47:03Z 2025-03-09T09:47:03Z improve some comments Hiltjo Posthuma hiltjo@codemadness.org commit aba286b23210523ed76e012d608c3e09c65e9dad parent d30b443f23a15ffab12f6a00931d979b9cfab061 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 9 Mar 2025 10:47:03 +0100 improve some comments d30b443f23a15ffab12f6a00931d979b9cfab061 2025-03-09T09:46:12Z 2025-03-09T09:46:12Z do not use ctype functions Hiltjo Posthuma hiltjo@codemadness.org commit 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. 07c37ef3931e33b55aebe2561ed92d37735cabe8 2024-06-11T22:28:12Z 2024-06-11T22:28:12Z tests.sh: add a few more tests for ambigous moves (files and ranks) Hiltjo Posthuma hiltjo@codemadness.org commit 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) 887918beab1aba026f2c228bb8ef770d420d338e 2024-06-11T13:42:26Z 2024-06-11T13:44:25Z fix notating files and rank for piece moves Hiltjo Posthuma hiltjo@codemadness.org commit 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. 32c2e6a2c44fba3b0242123894dcacf79f59578f 2024-06-11T13:41:46Z 2024-06-11T13:44:25Z fix incorrect check of enpassant square (x -> y) for checks/checkmate Hiltjo Posthuma hiltjo@codemadness.org commit 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 13632b938c00ed21681a7bde25d8c119666524b8 2024-06-11T13:41:20Z 2024-06-11T13:44:22Z add 2 tests and log errors to stderr Hiltjo Posthuma hiltjo@codemadness.org commit 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 b157d49005e4d9fd2e5e979b72a1e222e21fdec3 2024-02-29T18:02:30Z 2024-02-29T18:02:30Z add option to not highlight the last played move or checks or checkmates Hiltjo Posthuma hiltjo@codemadness.org commit 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. 52d9636da4a82de476f21b1c61de8b7570f96c92 2024-01-31T20:09:22Z 2024-01-31T20:09:22Z add love theme and valentine puzzles Hiltjo Posthuma hiltjo@codemadness.org commit 52d9636da4a82de476f21b1c61de8b7570f96c92 parent 208dbcea3dd150fb2eb4ef1a8469acf9df2940ab Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 31 Jan 2024 21:09:22 +0100 add love theme and valentine puzzles 208dbcea3dd150fb2eb4ef1a8469acf9df2940ab 2024-01-28T12:24:42Z 2024-01-28T12:24:42Z remove TODO Hiltjo Posthuma hiltjo@codemadness.org commit 208dbcea3dd150fb2eb4ef1a8469acf9df2940ab parent 8f1c842cc8cc6ef6a5b8f6020a94d54a83f21542 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 28 Jan 2024 13:24:42 +0100 remove TODO 8f1c842cc8cc6ef6a5b8f6020a94d54a83f21542 2024-01-28T12:23:20Z 2024-01-28T12:23:20Z tests.sh: remove duplicate tested entries Hiltjo Posthuma hiltjo@codemadness.org commit 8f1c842cc8cc6ef6a5b8f6020a94d54a83f21542 parent 4edab675e79782ae15324c3a890c87068521b999 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 28 Jan 2024 13:23:20 +0100 tests.sh: remove duplicate tested entries 4edab675e79782ae15324c3a890c87068521b999 2024-01-27T20:02:21Z 2024-01-27T20:02:21Z test all possible castling positions Hiltjo Posthuma hiltjo@codemadness.org commit 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. 551d1075b050556fafd5ff8c86e0b3a92bbbda46 2024-01-27T20:00:45Z 2024-01-27T20:00:45Z fen.c: fix castling for chess960 Hiltjo Posthuma hiltjo@codemadness.org commit 551d1075b050556fafd5ff8c86e0b3a92bbbda46 parent bf941d069fdc94c7157de62e737e9f305a751b5b Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 27 Jan 2024 21:00:45 +0100 fen.c: fix castling for chess960 bf941d069fdc94c7157de62e737e9f305a751b5b 2024-01-27T19:22:18Z 2024-01-27T19:22:18Z initial stub for new castling tests Hiltjo Posthuma hiltjo@codemadness.org commit bf941d069fdc94c7157de62e737e9f305a751b5b parent 78e1ed61ec461637e664b9527f002e232f30ca6e Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 27 Jan 2024 20:22:18 +0100 initial stub for new castling tests 78e1ed61ec461637e664b9527f002e232f30ca6e 2024-01-22T19:28:16Z 2024-01-22T19:28:16Z some improvements Hiltjo Posthuma hiltjo@codemadness.org commit 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. e62dd220612aaada2231586e9c00845700bf4949 2024-01-22T18:56:19Z 2024-01-22T18:56:19Z tests.sh: add a few more castle tests Hiltjo Posthuma hiltjo@codemadness.org commit 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 bcb9d6c7bd496cd907cd960f599eb8d19730973d 2024-01-22T18:42:53Z 2024-01-22T18:42:53Z docs: archive table with chess960 starting positions Hiltjo Posthuma hiltjo@codemadness.org commit 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 3ee1d913ba6bcafbf4647c86d45aaf958954793e 2024-01-22T18:28:32Z 2024-01-22T18:28:32Z add a separate script to generate a gif or tty animation from FEN + moves Hiltjo Posthuma hiltjo@codemadness.org commit 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 5bf484cc8a074778fe73a54541288119dd207822 2024-01-22T00:36:43Z 2024-01-22T00:36:43Z fen.c: improve more subtle things in chess960 castling Hiltjo Posthuma hiltjo@codemadness.org commit 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 34e46a6fdd7cddde422a6b75c285879951d540e9 2024-01-22T00:09:24Z 2024-01-22T00:09:24Z generate.sh: fix to detect possible rook promotion and support uppercase Hiltjo Posthuma hiltjo@codemadness.org commit 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 0dcd2f065cb678018fb2e30055550987705a09c5 2024-01-22T00:07:15Z 2024-01-22T00:07:27Z tests.sh: add some more castling and chess960 PGN tests Hiltjo Posthuma hiltjo@codemadness.org commit 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 14096028aee533f132200b020687e1ce3884105b 2024-01-22T00:04:59Z 2024-01-22T00:07:25Z fen.c: simplify castling code Hiltjo Posthuma hiltjo@codemadness.org commit 14096028aee533f132200b020687e1ce3884105b parent 3ccf4d4450965cc2853d9cbc8b81b75cfd44660a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 22 Jan 2024 01:04:59 +0100 fen.c: simplify castling code 3ccf4d4450965cc2853d9cbc8b81b75cfd44660a 2024-01-21T23:55:15Z 2024-01-21T23:55:15Z fen.c: fix highlight square when castling Hiltjo Posthuma hiltjo@codemadness.org commit 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 7915ffd10d87934201c751632a4e1dd4c3cb65cb 2024-01-21T23:55:02Z 2024-01-21T23:55:02Z fen.c: improve castling with chess960 Hiltjo Posthuma hiltjo@codemadness.org commit 7915ffd10d87934201c751632a4e1dd4c3cb65cb parent 37c4fe7bb023a2537fd8221042a9b62086c6532b Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 22 Jan 2024 00:55:02 +0100 fen.c: improve castling with chess960 37c4fe7bb023a2537fd8221042a9b62086c6532b 2024-01-14T19:30:56Z 2024-01-14T19:30:56Z fen.c: fix a typo Hiltjo Posthuma hiltjo@codemadness.org commit 37c4fe7bb023a2537fd8221042a9b62086c6532b parent 62500fd8c67b353a43bad026d0f730eccbd90b47 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 14 Jan 2024 20:30:56 +0100 fen.c: fix a typo 62500fd8c67b353a43bad026d0f730eccbd90b47 2024-01-14T18:23:25Z 2024-01-14T18:23:25Z improve documentation and reference the pgn-extract tool Hiltjo Posthuma hiltjo@codemadness.org commit 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 e34a8cc5befa1d22f9468bb9169113acb84ef6f8 2024-01-14T18:17:10Z 2024-01-14T18:17:10Z test.sh: add more promotion tests and fixup for case if input is incorrect Hiltjo Posthuma hiltjo@codemadness.org commit 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 a7b46089306de698b20b0400a8ec9f3ccda3f729 2024-01-14T18:09:38Z 2024-01-14T18:09:38Z fen.c: fix promotion to rook, fix regression in promotion and PGN output for it Hiltjo Posthuma hiltjo@codemadness.org commit 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 c569951f00bbd5517962401c1f090cac6a99a8c5 2024-01-08T21:01:09Z 2024-01-08T21:03:56Z update TODO Hiltjo Posthuma hiltjo@codemadness.org commit c569951f00bbd5517962401c1f090cac6a99a8c5 parent 79add5ed63f4c15703b14bfa3209d5046f8ebb3f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 8 Jan 2024 22:01:09 +0100 update TODO 79add5ed63f4c15703b14bfa3209d5046f8ebb3f 2024-01-08T20:55:31Z 2024-01-08T21:03:56Z fen.c: remove unneccesary check Hiltjo Posthuma hiltjo@codemadness.org commit 79add5ed63f4c15703b14bfa3209d5046f8ebb3f parent abc52654a913253417dcd329cf70a975f8674dd6 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 8 Jan 2024 21:55:31 +0100 fen.c: remove unneccesary check abc52654a913253417dcd329cf70a975f8674dd6 2024-01-08T20:54:24Z 2024-01-08T21:03:53Z fen.c: fix invalid piece name for queenside castling for black Hiltjo Posthuma hiltjo@codemadness.org commit 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.) df3a95f12df8a701ed0ad5997be6ad5c3f840bda 2024-01-08T20:50:26Z 2024-01-08T20:51:34Z small code-cleanup and add some comments Hiltjo Posthuma hiltjo@codemadness.org commit 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 da65c61271ad6e8eb3fde5a8e828ed4d2c882fb2 2024-01-08T20:36:42Z 2024-01-08T20:36:42Z fen.c: CGI mode: write output header before play moves Hiltjo Posthuma hiltjo@codemadness.org commit 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. 2037128c8c5a1527bddad29041660177a1cee999 2024-01-08T20:36:15Z 2024-01-08T20:36:15Z fen.c: CGI mode, add dutch mode parameter, will also set piece mapping Hiltjo Posthuma hiltjo@codemadness.org commit 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 5f6b743ef448f1d096d01ffafe4d112e47768a2f 2024-01-07T14:51:17Z 2024-01-07T14:51:17Z tests.sh: add 2 tests Hiltjo Posthuma hiltjo@codemadness.org commit 5f6b743ef448f1d096d01ffafe4d112e47768a2f parent 1f750e11a33213399d0ae7f8817d52f35cc8b6b8 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 7 Jan 2024 15:51:17 +0100 tests.sh: add 2 tests 1f750e11a33213399d0ae7f8817d52f35cc8b6b8 2024-01-06T14:40:35Z 2024-01-06T14:42:33Z various improvements and features Hiltjo Posthuma hiltjo@codemadness.org commit 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. 0fe1f6ac19819dd3954b8520db31a66f76d7cf87 2024-01-04T20:03:31Z 2024-01-04T20:03:31Z update TODO and failing tests Hiltjo Posthuma hiltjo@codemadness.org commit 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. 6554fcb56e12be089dbbf0e700f6777924e8b5b6 2024-01-04T16:04:22Z 2024-01-04T16:04:48Z enable output options for the CGI mode Hiltjo Posthuma hiltjo@codemadness.org commit 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 cd3acc17b7b82e112bd5abbc65324283a7c5bf7f 2024-01-04T15:44:29Z 2024-01-04T15:44:29Z various improvements Hiltjo Posthuma hiltjo@codemadness.org commit 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. f1daa80c1d6cf199c57d820e117255f38bd3d55e 2023-12-25T17:54:16Z 2023-12-25T17:54:16Z add LEN() macro and use it Hiltjo Posthuma hiltjo@codemadness.org commit f1daa80c1d6cf199c57d820e117255f38bd3d55e parent 6af435b4416d90cb27e447e2f0bf505721374e12 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 25 Dec 2023 18:54:16 +0100 add LEN() macro and use it 6af435b4416d90cb27e447e2f0bf505721374e12 2023-12-25T17:49:58Z 2023-12-25T17:49:58Z add util functions for (x,y) to (file, rank) and vice versa Hiltjo Posthuma hiltjo@codemadness.org commit 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 b7a52ecde26555a060898faaa5643851368c7467 2023-12-24T10:51:14Z 2023-12-24T10:51:14Z fen.1: comment pgn option for now, it is disabled Hiltjo Posthuma hiltjo@codemadness.org commit 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 9a70ccee5e9c5462e079304c3521c2c7640bf51d 2023-12-24T10:38:26Z 2023-12-24T10:38:26Z fen.c: reduce filesize of SVG further Hiltjo Posthuma hiltjo@codemadness.org commit 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. e536a441d52c33adea06f8ed451bd890a3ebdb9d 2023-12-23T17:59:46Z 2023-12-23T17:59:46Z fen: various code improvements, initial code for PGN output (disabled for now) Hiltjo Posthuma hiltjo@codemadness.org commit 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 4f6db6f748b3760f1f991e46bbb37246d201d4c8 2023-12-21T21:45:17Z 2023-12-21T21:46:26Z stream_lichess.sh: read initial FEN for chess960, show white vs black name Hiltjo Posthuma hiltjo@codemadness.org commit 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 aa7a4692fb14c40930fde876585a70a88b76b3e2 2023-12-21T21:20:34Z 2023-12-21T21:38:31Z improve tests and label them Hiltjo Posthuma hiltjo@codemadness.org commit aa7a4692fb14c40930fde876585a70a88b76b3e2 parent 35cfce88175a31ca9b1db67e70575f66182d8ab2 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 21 Dec 2023 22:20:34 +0100 improve tests and label them 35cfce88175a31ca9b1db67e70575f66182d8ab2 2023-12-21T21:19:16Z 2023-12-21T21:35:51Z fen.c: improve castling for chess960 Hiltjo Posthuma hiltjo@codemadness.org commit 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. cb828aa3fa341d3af5e9338132497cf49671369f 2023-12-21T19:29:26Z 2023-12-21T19:29:26Z generate.sh: only show cursor when solutions are collapsed Hiltjo Posthuma hiltjo@codemadness.org commit 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. 10ce46bdd74256d98eec084142787f40730c582d 2023-12-21T19:27:17Z 2023-12-21T19:27:17Z generate.sh: fix last puzzles, some usability improvements Hiltjo Posthuma hiltjo@codemadness.org commit 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 2046625e2948b915fb5f7b6244e54f79cf2c2a8a 2023-12-21T18:57:04Z 2023-12-21T19:15:37Z fen.c: optimization for size: do not use true-color where its not needed Hiltjo Posthuma hiltjo@codemadness.org commit 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. 2f8f9b16e1834cdd577d590efc51be17f3013585 2023-12-21T17:27:41Z 2023-12-21T17:27:41Z fen.c: code cleanup: separate parsing FEN and moves in 2 functions Hiltjo Posthuma hiltjo@codemadness.org commit 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 752c96801f72527cf5bc3faab7ad7d1d7889ddbf 2023-12-21T17:17:34Z 2023-12-21T17:17:34Z update TODO Hiltjo Posthuma hiltjo@codemadness.org commit 752c96801f72527cf5bc3faab7ad7d1d7889ddbf parent 4d582297eea29262d3ed81b786c28276e006589f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 21 Dec 2023 18:17:34 +0100 update TODO 4d582297eea29262d3ed81b786c28276e006589f 2023-12-21T17:15:09Z 2023-12-21T17:15:09Z improve man page documentation Hiltjo Posthuma hiltjo@codemadness.org commit 4d582297eea29262d3ed81b786c28276e006589f parent 667fa14261d797a2c04938992a4efa5061e558a2 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 21 Dec 2023 18:15:09 +0100 improve man page documentation 667fa14261d797a2c04938992a4efa5061e558a2 2023-12-21T17:14:27Z 2023-12-21T17:14:27Z generate.sh: improve portability and performance, use randomness using a seed Hiltjo Posthuma hiltjo@codemadness.org commit 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. b9e10f90912e4d6c82e4a4738a2fcdbd77b0d6db 2023-12-21T16:58:13Z 2023-12-21T16:58:13Z improve check for castling and castling availability Hiltjo Posthuma hiltjo@codemadness.org commit 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. 526df2437b7f656c5f7f68f207478dd2ee15db53 2023-12-20T23:56:37Z 2023-12-20T23:56:37Z tty output: remove some unneeded/double escape codes Hiltjo Posthuma hiltjo@codemadness.org commit 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 7ec50aca8a290c15c92a71fde6dc99977330ea10 2023-12-20T23:48:01Z 2023-12-20T23:48:01Z update README Hiltjo Posthuma hiltjo@codemadness.org commit 7ec50aca8a290c15c92a71fde6dc99977330ea10 parent 1a4ecae770df28922372ddc0a2e60cc173237a68 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 21 Dec 2023 00:48:01 +0100 update README 1a4ecae770df28922372ddc0a2e60cc173237a68 2023-12-20T23:38:18Z 2023-12-20T23:38:18Z fen.1: fix a typo Hiltjo Posthuma hiltjo@codemadness.org commit 1a4ecae770df28922372ddc0a2e60cc173237a68 parent 377132fbd774962230e6980b376de721f2ec467e Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 21 Dec 2023 00:38:18 +0100 fen.1: fix a typo 377132fbd774962230e6980b376de721f2ec467e 2023-12-20T23:33:07Z 2023-12-20T23:36:50Z update TODO Hiltjo Posthuma hiltjo@codemadness.org commit 377132fbd774962230e6980b376de721f2ec467e parent 0d2f03825dce77e698f85d349ff7d35e72031f6d Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 21 Dec 2023 00:33:07 +0100 update TODO 0d2f03825dce77e698f85d349ff7d35e72031f6d 2023-12-20T23:32:41Z 2023-12-20T23:36:50Z improve tty board border size a bit Hiltjo Posthuma hiltjo@codemadness.org commit 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 d3c8592f3761018e4fac3ba37503f432cb1dda1f 2023-12-20T23:24:03Z 2023-12-20T23:36:46Z add a script to stream a lichess game using the FEN tty output Hiltjo Posthuma hiltjo@codemadness.org commit 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 528629a967639e013c56fee9c293b7b87376d15e 2023-12-20T23:20:34Z 2023-12-20T23:20:34Z fen.1: add initial man page Hiltjo Posthuma hiltjo@codemadness.org commit 528629a967639e013c56fee9c293b7b87376d15e parent 212c82b75fc13feab19a991ac284ab92e3c352ff Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 21 Dec 2023 00:20:34 +0100 fen.1: add initial man page 212c82b75fc13feab19a991ac284ab92e3c352ff 2023-12-20T22:55:54Z 2023-12-20T22:55:54Z en passant should reset halfmove counter Hiltjo Posthuma hiltjo@codemadness.org commit 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. 10e231516543327f556abc8b73c31c1e114ede48 2023-12-20T22:53:58Z 2023-12-20T22:53:58Z fix a bug in FEN en passant parsing, handle en passant takes Hiltjo Posthuma hiltjo@codemadness.org commit 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. f2415a87c11df764bacefa67d70efd1c57bd66ff 2023-12-20T21:46:22Z 2023-12-20T21:46:22Z update README Hiltjo Posthuma hiltjo@codemadness.org commit f2415a87c11df764bacefa67d70efd1c57bd66ff parent d9c1c31debf454d25aaebc6eb90a2bca3e1eb52e Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 20 Dec 2023 22:46:22 +0100 update README d9c1c31debf454d25aaebc6eb90a2bca3e1eb52e 2023-12-20T21:39:53Z 2023-12-20T21:39:53Z fix typo and compile error Hiltjo Posthuma hiltjo@codemadness.org commit 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. e1243f806a094c73adcc8bb2dd8633ff852ba1e4 2023-12-20T21:37:40Z 2023-12-20T21:37:40Z add TODO Hiltjo Posthuma hiltjo@codemadness.org commit e1243f806a094c73adcc8bb2dd8633ff852ba1e4 parent a749e990b529966883178e9cfe8ebfc6faec25b4 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 20 Dec 2023 22:37:40 +0100 add TODO a749e990b529966883178e9cfe8ebfc6faec25b4 2023-12-20T21:32:00Z 2023-12-20T21:37:05Z flip puzzles if its black to move Hiltjo Posthuma hiltjo@codemadness.org commit 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 b50c708ac5b44591b62aaa443022625c3fdd44cb 2023-12-20T21:31:43Z 2023-12-20T21:31:43Z command-line parsing for formats, add OpenBSD pledge Hiltjo Posthuma hiltjo@codemadness.org commit 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 3d921c8e0e2011ae994e508e89fc71086fffd598 2023-12-20T20:54:11Z 2023-12-20T20:54:11Z option to flip the board Hiltjo Posthuma hiltjo@codemadness.org commit 3d921c8e0e2011ae994e508e89fc71086fffd598 parent 3c9f4a2be304b3f0d197d69bea715ee0c9e29570 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 20 Dec 2023 21:54:11 +0100 option to flip the board 3c9f4a2be304b3f0d197d69bea715ee0c9e29570 2023-12-20T20:16:57Z 2023-12-20T20:16:57Z remove double unneccesary reset Hiltjo Posthuma hiltjo@codemadness.org commit 3c9f4a2be304b3f0d197d69bea715ee0c9e29570 parent cbf34cae81cb9545e3854c19eb15040f106ab02f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 20 Dec 2023 21:16:57 +0100 remove double unneccesary reset cbf34cae81cb9545e3854c19eb15040f106ab02f 2023-12-20T20:16:42Z 2023-12-20T20:16:42Z make it easier to change the color theme for svg and tty Hiltjo Posthuma hiltjo@codemadness.org commit 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 b55e73ad95fbbe333cdac344ca25a84dc61151b0 2023-12-20T20:07:30Z 2023-12-20T20:07:30Z slightly improve ascii output for colored squares and highlighted squares Hiltjo Posthuma hiltjo@codemadness.org commit 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 64c4e3aaecf348c2cb7c61f5569cae1a820d20db 2023-12-20T19:35:16Z 2023-12-20T19:35:16Z detect en passant, add some tests for it Hiltjo Posthuma hiltjo@codemadness.org commit 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 d69d3ff1075f952ebdd45af40e7580bb3003721f 2023-12-20T19:19:55Z 2023-12-20T19:19:55Z remove the ability to castle when the king or rook moves Hiltjo Posthuma hiltjo@codemadness.org commit 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 a0e61726e8e522f6731e6eb27e18856f4fde61fb 2023-12-20T19:19:38Z 2023-12-20T19:19:38Z fix incorrect (x,y) parameters for taking a piece Hiltjo Posthuma hiltjo@codemadness.org commit 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 4ccd78674dc439a488331c561af552b0b129d621 2023-12-20T19:19:08Z 2023-12-20T19:19:08Z expand tests for castling etc Hiltjo Posthuma hiltjo@codemadness.org commit 4ccd78674dc439a488331c561af552b0b129d621 parent 732bc42efda65c2ecc30a416f20516b9fcca62f6 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 20 Dec 2023 20:19:08 +0100 expand tests for castling etc 732bc42efda65c2ecc30a416f20516b9fcca62f6 2023-12-20T18:30:21Z 2023-12-20T18:30:21Z add a useful reference about the PGN and FEN formats etc Hiltjo Posthuma hiltjo@codemadness.org commit 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 53bf056699cba0e1bd1b06260600385ac5ad0780 2023-12-20T18:29:59Z 2023-12-20T18:29:59Z add initial tests Hiltjo Posthuma hiltjo@codemadness.org commit 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 aaac499d48085948814415956d3eb4ded33eb704 2023-12-20T18:26:30Z 2023-12-20T18:26:30Z when moving the king or castling remove the ability to castle Hiltjo Posthuma hiltjo@codemadness.org commit 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. dab21427a28e5561843d56cb4de324cddd4c53c7 2023-12-20T18:26:23Z 2023-12-20T18:26:23Z improve move number parsing Hiltjo Posthuma hiltjo@codemadness.org commit dab21427a28e5561843d56cb4de324cddd4c53c7 parent 30a2ab3dd2979115341beaedc6d4a4918541036a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 20 Dec 2023 19:26:23 +0100 improve move number parsing 30a2ab3dd2979115341beaedc6d4a4918541036a 2023-12-20T17:50:33Z 2023-12-20T17:50:33Z add OnlyFENs output option for the current board state Hiltjo Posthuma hiltjo@codemadness.org commit 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 0bf730b426ada19f487f1791faf13269989abc04 2023-12-20T17:50:17Z 2023-12-20T17:50:17Z make command-line arguments more flexible Hiltjo Posthuma hiltjo@codemadness.org commit 0bf730b426ada19f487f1791faf13269989abc04 parent 132c4a50aae9c410bf3b505f4c61b322c388cf83 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 20 Dec 2023 18:50:17 +0100 make command-line arguments more flexible 132c4a50aae9c410bf3b505f4c61b322c388cf83 2023-12-19T19:11:09Z 2023-12-19T19:11:09Z improve and extend FEN parsing and FEN output Hiltjo Posthuma hiltjo@codemadness.org commit 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 29822d687c7eed634e2fd6b480ddbf84cbabf4c2 2023-12-18T23:50:04Z 2023-12-18T23:50:04Z README: update filenames Hiltjo Posthuma hiltjo@codemadness.org commit 29822d687c7eed634e2fd6b480ddbf84cbabf4c2 parent d7273cde403340578a406a58fc419ae03277a84f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 19 Dec 2023 00:50:04 +0100 README: update filenames d7273cde403340578a406a58fc419ae03277a84f 2023-12-18T23:49:17Z 2023-12-18T23:49:17Z merge code together, symlink binaries Hiltjo Posthuma hiltjo@codemadness.org commit d7273cde403340578a406a58fc419ae03277a84f parent 318de62766d2fd0caa0594f939cd1b2d9d143e0a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 19 Dec 2023 00:49:17 +0100 merge code together, symlink binaries 318de62766d2fd0caa0594f939cd1b2d9d143e0a 2023-12-18T23:33:27Z 2023-12-18T23:33:27Z allow "startpos" for FEN for the starting position Hiltjo Posthuma hiltjo@codemadness.org commit 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 d1450a9bf4d9b009733094038420a82a6872a8ae 2023-12-18T23:31:55Z 2023-12-18T23:31:55Z implement detecting castling for moves Hiltjo Posthuma hiltjo@codemadness.org commit d1450a9bf4d9b009733094038420a82a6872a8ae parent 09a541233ed6f1abf9f4498b37d1281a78f65ce8 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 19 Dec 2023 00:31:55 +0100 implement detecting castling for moves 09a541233ed6f1abf9f4498b37d1281a78f65ce8 2023-12-18T23:31:34Z 2023-12-18T23:31:34Z separate function to check a valid piece character Hiltjo Posthuma hiltjo@codemadness.org commit 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 5df80ee4eebb2000bcac5530f58e6c84e9b92818 2023-12-18T21:16:22Z 2023-12-18T21:16:22Z generate.sh: add initial solutions/spoiler page Hiltjo Posthuma hiltjo@codemadness.org commit 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 098952703cf713b7569ae0cb826a08a239e3b46a 2023-12-18T21:15:46Z 2023-12-18T21:15:46Z fen_to_*.c: handle possible piece promotion for moves Hiltjo Posthuma hiltjo@codemadness.org commit 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 b8fe22e0b3297f81eca81b3c5ad8f2fd7e918c38 2023-12-18T14:55:04Z 2023-12-18T14:55:04Z fen_to_tty: make showcoords = 0 work properly Hiltjo Posthuma hiltjo@codemadness.org commit 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 26d727fe71a7e77b2eb1f733e2ad738b52089c54 2023-12-18T14:51:15Z 2023-12-18T14:52:49Z fen_to_tty: add initial tty version Hiltjo Posthuma hiltjo@codemadness.org commit 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