Allow promoting to any piece
This commit is contained in:
parent
5ef202d1b5
commit
bc979fee2f
|
@ -348,13 +348,9 @@
|
|||
case 'B':
|
||||
case 'N':
|
||||
case 'R':
|
||||
promotion = move.slice(index, index + 1);
|
||||
break;
|
||||
case 'K':
|
||||
return {error: 'Cannot promote a piece to king'};
|
||||
break;
|
||||
case 'P':
|
||||
return {error: 'Cannot promote a piece to pawn'};
|
||||
promotion = move.slice(index, index + 1);
|
||||
break;
|
||||
default:
|
||||
return {error: 'Unrecognized piece: ' + move.slice(index, index + 1)};
|
||||
|
|
Loading…
Reference in New Issue