Generalize FEN e.p. field to handle diagonal and triple pushes
authorH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 6 Dec 2016 16:19:00 +0000 (17:19 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 13 Jan 2017 15:39:25 +0000 (16:39 +0100)
commit07a436432ceac681e3e06f8a035d4f4d6413fb15
treec677e662c00189260418b21addf5df5451898a7f
parent57c7fed9ebd0ac59ba8e6ba5ec9463acd0182998
Generalize FEN e.p. field to handle diagonal and triple pushes

In Berolina Chess a single square canot unambiguously indicate which
e.p. capture ispossible, as two initial double-pushes could cross over
the same square (and a 4th-rank Pawn could have come from two 2nd-rank
locations). So both the skipped square and the location of the corresponding
e.p.victim have to be mentioned in the e.p. field of a FEN. This is now
supported (in variant Berolina) on both reading and writing.
  In addition, the test for when an e.p. field has to be added is improved.
It was still using hard-coded rank numbers, only acting on 2->4 and 7->5
Pawn moves that stayed on the same file. Now it works on any advance of
more than one rank. For pushes of more than one rank the e.p. square is
biased towards the from-square. This makes it possible to distinguish
between a triple and a double-push that end on the same rank.
backend.c