added xiangqi specific move notation
This commit is contained in:
parent
645d20d7f8
commit
bce0574e57
1 changed files with 9 additions and 0 deletions
|
@ -267,5 +267,14 @@
|
|||
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);
|
||||
}
|
||||
|
||||
})();
|
Loading…
Reference in a new issue