tests.sh: add a few more castle tests - chess-puzzles - chess puzzle book generator
(HTM) git clone git://git.codemadness.org/chess-puzzles
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit e62dd220612aaada2231586e9c00845700bf4949
(DIR) parent bcb9d6c7bd496cd907cd960f599eb8d19730973d
(HTM) 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
Diffstat:
M TODO | 10 ----------
M tests.sh | 30 ++++++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 10 deletions(-)
---
(DIR) diff --git a/TODO b/TODO
@@ -1,13 +1,3 @@
- rename fen.c to be more unique so it can be installed in $PATH.
-- read PGN to moves? if its simple to do so.
- - input and output piece mapping? This would make it useful to convert Dutch
- PGN notated games to Lichess etc.
- more tests.
- - piece ambiguity.
- - en passant (in check), etc.
- - in check, checkmate.
- - test more chess960 black kingside and queenside castling.
- test more long sequence and halfmove and movenumber counts.
-? PGN output: add game termination state?
- - PGN output: add stalemate?
- - PGN output: but what if resign, time-out, draw offer?
(DIR) diff --git a/tests.sh b/tests.sh
@@ -311,6 +311,21 @@ testfen 'castling chess960'\
'qnkr1r2/p1p1p2p/4nppN/1p6/1P1p4/3P2P1/PQPNPP1P/2RK2Rb w KQ - 4 13'\
'qnrkbnrb/pppppppp/8/8/8/8/PPPPPPPP/QNRKBNRB w KQkq - 0 1'\
'd2d3 g7g6 e1c3 d7d5 c3h8 g8h8 b2b4 h8g8 g2g3 e8c6 f1e3 b7b5 a1e5 f7f6 e5d4 f8e6 d4b2 d5d4 e3g4 c6h1 g4h6 g8f8 b1d2 d8c8'
+
+testfen 'castling chess960'\
+ 'r2k1r2/1pb3pp/2ppqp2/p2np3/P3N1P1/1N1P1P2/1PPBP1QP/R4RK1 b kq - 1 14'\
+ 'r2k1r2/1pb3pp/2ppqp2/p2np3/P3N1P1/1N1P1P2/1PPBP1QP/R2K1R2 w KQ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