Talk:Generate random chess position

From Rosetta Code
Revision as of 02:16, 27 September 2018 by rosettacode>Gerard Schildberger (added underlining of a word.)

Can there be a white pawn in the first rank (and black in the last)? I was never taught that pawns have a reverse gear. --Tim-brown (talk) 08:56, 14 December 2015 (UTC)

Task description says The picking of pieces does not have to comply to a regular chess set and then goes on to give a variety of examples of "illegal" boards. It is also very specific about the constraints it places on pawns. Rather than excluding pawns from the first and last row of the board, it is careful to exclude each color from only one of those rows. --Rdm (talk) 09:36, 14 December 2015 (UTC)
To clarify: yes, putting a white pawn on the first rank or a black pawn on the eighth rank is allowed, even if it's impossible in a normal chess game. The reason is that on lichess sometimes players challenge each other on custom starting positions and it's not rare that they chose to place pawns there.--Grondilu (talk) 11:42, 14 December 2015 (UTC)
Having a pawn on the eigth rank is not impossible.   Normally, when a pawn reaches the eighth rank, it can be promoted.   However, promotion is not   required,   and if left unpromoted, it remains a (dead) pawn.   I don't know of any normal (timed) game that a pawn has been left unprompted, but this has happened when playing speed (blitz) chess.   Once you "hit the clock", that pawn is forever a pawn.   -- Gerard Schildberger (talk) 22:25, 18 July 2018 (UTC)