niklasf / chessops

Chess and chess variant rules and operations in TypeScript
https://niklasf.github.io/chessops/
GNU General Public License v3.0
119 stars 35 forks source link

Promote pawns to queens if no promotion is specified #106

Closed 370417 closed 2 years ago

370417 commented 2 years ago

In scalachess, moving a pawn to the backrank automatically promotes it to a queen. In chessops, it results in ERR_PAWNS_ON_BACKRANK.

This pull request makes chessops behave more like scalachess with pawn promotions.

This is intended to fix https://lichess.org/forum/lichess-feedback/avoidable-bug-with-puzzles-in-blind-mode.

370417 commented 2 years ago

No longer really needed now that lichess-org/lila#11706 is resolved

niklasf commented 2 years ago

Thanks for the PR and the update. I think it's best not to introduce implicit promotions, here.