I first spotted this problem when using WB for Berolina Chess, which I first thought would be playable as 'normal' with legality testing off. The only fix I made at that time was to make Berolina a separate variant, where I explicitly altered the e.p. heuristic. (So it still does no know the Pawns move differently, and thus still needs legality testing off. But I never bothered to fix that, as no one seemed to play it anyway.)Evert wrote:Which reminds me - in variants where pawns move diagonally (or generally differently), WinBoard sometimes erroneously thinks there's an en-passant capture. Would it be possible to add a piece type that is displayed as a pawn, but that doesn't do en-passant captures? What would already help of course is if it would check whether the pawn that is en-passant captured has just been advanced two spaces or not...
Note it's been a while since I first spotted this problem, it may be fixed already in a more recent version. In which case I should take the trouble to update.
What you suggest (paying attention to rights) would probably be a good fix (i.e. not likely to break anything in normal Chess, e.g. when e.p. rights are unknown because the position was set up in EditPosition mode). In fact for Berolina this was mandatory, as playing a capture-only move to an empty square does not imply by itself which neighboring Pawn to delete.
Note, however, that WinBoard now uses the Hoplite in general as an e.p.-less Pawn. Originally that was only in Spartan, exactly to circumvent the problem you mentioned. But I decided at some point that the special code that this attached to the Hoplite (resetting the 50-move counter, and promoting it when it reaches last rank) might as well be active in all variants where the spear symbol was not explicitly in use as Amazon. (i.e. all variants but SuperChess). Actually I wonder if I should not switch Berolina to using this symbol for Pawns, as they would already have the correct moves. The only thing that would be needed would be to apply the special Berolina e.p. code to Hoplites in stead of Pawns, in Berolina only. (Just like it is applied now to normal Pawns in Berolina only).
Fairy-Max 4.8R was handling Berolina e.p. wrong, btw. It rejected diagonal moves to the e.p. square, assuming these were attempts to capture e.p., while diagonal moves are only allowed as non-captures on Berolina Pawns. I now changed that by applying the extra rule (besides Pawn moves to e.p. square) that the move should have capture rights before considering it an e.p. attempt, and otherwise just keep considering it a normal non-capture.
