Promotion Square

From Chessprogramming wiki
Jump to: navigation, search

Home * Chess * Squares * Promotion Square

The Promotion Square is the farthest telestop of a pawn. It is the square on the same file on opponent's back rank where finally a promotion of the pawn would happen, assuming non-capturing pawn pushes. The promotion square can easily calculated from the pawn origin and color of the pawn, by adding the file to the respective back rank offset (assuming Little endian file and rank coordinates here):

promotionSquare ::= ((color-1) & 56) + (pawnSquare & 7);  // white = 0, black = 1

See also

Forum Posts

Up one Level