25,161
edits
Changes
Created page with "'''Home * Chess * Squares * Promotion Square''' The '''Promotion Square''' is the farthest telestop of a pawn..."
'''[[Main Page|Home]] * [[Chess]] * [[Squares]] * Promotion Square'''
The '''Promotion Square''' is the farthest [[Pawn Spans#StopandDistantStop|telestop]] of a [[Pawn|pawn]]. It is the square on the same [[Files|file]] on opponent's [[Ranks|back rank]] where finally a [[Promotions|promotion]] of the pawn would happen, assuming non-capturing [[Pawn Push|pawn pushes]]. The promotion square can easily calculated from the pawn [[Origin Square|origin]] and [[Color|color]] of the pawn, by adding the file to the respective back rank offset (assuming [[Square Mapping Considerations#LittleEndianRankFileMapping|Little endian file and rank coordinates]] here):
<pre>
promotionSquare ::= ((color-1) & 56) + (pawnSquare & 7); // white = 0, black = 1
</pre>
=See also=
* [[Pawn Spans]] in [[Bitboards]]
* [[Pawn Structure]]
* [[Promotions]]
* [[Stop Square]]
=Forum Posts=
* [https://www.stmintz.com/ccc/index.php?id=334247 making code color independant] by [[Georg von Zimmermann]], [[CCC]], December 08, 2003
'''[[Squares|Up one Level]]'''
The '''Promotion Square''' is the farthest [[Pawn Spans#StopandDistantStop|telestop]] of a [[Pawn|pawn]]. It is the square on the same [[Files|file]] on opponent's [[Ranks|back rank]] where finally a [[Promotions|promotion]] of the pawn would happen, assuming non-capturing [[Pawn Push|pawn pushes]]. The promotion square can easily calculated from the pawn [[Origin Square|origin]] and [[Color|color]] of the pawn, by adding the file to the respective back rank offset (assuming [[Square Mapping Considerations#LittleEndianRankFileMapping|Little endian file and rank coordinates]] here):
<pre>
promotionSquare ::= ((color-1) & 56) + (pawnSquare & 7); // white = 0, black = 1
</pre>
=See also=
* [[Pawn Spans]] in [[Bitboards]]
* [[Pawn Structure]]
* [[Promotions]]
* [[Stop Square]]
=Forum Posts=
* [https://www.stmintz.com/ccc/index.php?id=334247 making code color independant] by [[Georg von Zimmermann]], [[CCC]], December 08, 2003
'''[[Squares|Up one Level]]'''