added getInitialBoardState

This commit is contained in:
mig 2017-04-26 15:39:54 +02:00
parent 9c6d1af0dd
commit 645d20d7f8

View file

@ -971,6 +971,7 @@
return ProxiedMethod(this, "getPossibleMoves", arguments);
}
// experimental
GameProxy.prototype.getBoardState = function (format) {
var self = this;
if (this.game) {
@ -982,7 +983,17 @@
return ProxiedMethod(this, "getBoardState", arguments);
}
// experimental
GameProxy.prototype.getInitialBoardState = function (format) {
var self = this;
if (this.game) {
var self = this;
return new Promise(function (resolve, reject) {
resolve(self.game.ExportInitialBoardState(format));
});
} else
return ProxiedMethod(this, "getInitialBoardState", arguments);
}
GameProxy.prototype.resetView = function (force) {
if (jsContext == "node")
return Promise.reject(new Error("resetView(): not supported in node.js"));