mirror of
https://gitlab.com/manzerbredes/chessarbiter.git
synced 2025-05-23 07:37:40 +00:00
Cleaning promotion
This commit is contained in:
parent
bb5d85cb65
commit
5fdfda00a9
2 changed files with 6 additions and 2 deletions
|
@ -531,7 +531,7 @@ std::string ChessArbiter::ParseSAN(const std::string &SANMove) {
|
|||
}
|
||||
|
||||
char ChessArbiter::ParseSANPromotion(const std::string &SANMove){
|
||||
if(SANMove.length()>=4 && SANMove[0] - 'a' < 8 && SANMove[2]=='='){
|
||||
if(SANMove.length()>=4 && SANMove[2]=='='){
|
||||
char p=SANMove[3]; // Must be upper
|
||||
if(p=='Q' || p=='R' || p=='B' || p=='N'){
|
||||
return p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue