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