Allow zeros for castling in SAN notation

Fixes #3036.
pull/3484/head
Pepe Doval 2017-08-20 18:14:22 +02:00
parent 008e58882b
commit a7fd8116f1
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ lichess.keyboardMove = function(opts) {
var writer = sanWriter();
var sans = null;
var submit = function(v, force) {
// consider 0's as O's for castling
v = v.replace(/0/g, 'O');
var foundUci = v.length >= 2 && sans && sanToUci(v, sans);
if (foundUci) {
// ambiguous castle