Among the last types of moves to handle were pawn promotions. In SAN, these are expressed in the form rank file = promoted piece, e.g., e8=Q is the movement of the e-file pawn to e8 and subsequent promotion to queen.

The promotion can be also be a capture, e.g., hxg1=Q, the h-file pawn captures at g1 and promotes to queen.

Although rare, we support under-promotion, i.e., when the piece is promoted to something other than a queen. e.g., c8=R.

Pawn Promotion

Commit 22e79b0