--- a/src/chess/rules.c Sat Aug 01 10:53:44 2026 +0200 +++ b/src/chess/rules.c Sat Aug 01 10:58:39 2026 +0200 @@ -695,6 +695,10 @@ candidates[ccount].torow = row; candidates[ccount].tofile = file; candidates[ccount].capture = true; + if (piece_type(p) == PAWN && (row == 0 || row == 7)) { + /* the exact piece for promotion does not matter */ + candidates[ccount].promotion = mkpiece(QUEEN, color); + } ccount++; } }