added xiangqi specific move notation

This commit is contained in:
mig 2017-04-27 04:39:46 +02:00
parent 645d20d7f8
commit bce0574e57

View file

@ -267,5 +267,14 @@
return moveStr0; return moveStr0;
} }
Model.Move.ToString = function(format) {
var self = this;
function PosName(pos) {
var col = pos % 9;
var row = (pos-col)/9;
return String.fromCharCode(("a".charCodeAt(0))+col) + row;
}
return PosName(self.f) + PosName(self.t);
}
})(); })();