added match method getPossibleMoves

This commit is contained in:
mig 2017-04-14 15:17:34 +02:00
parent 6dab9eed00
commit 8b463b27f7

View file

@ -948,6 +948,19 @@
return ProxiedMethod(this, "viewControl", arguments);
}
GameProxy.prototype.getPossibleMoves = function () {
var self = this;
if (this.game) {
var self = this;
return new Promise(function (resolve, reject) {
if (!self.game.mBoard.mMoves || self.game.mBoard.mMoves.length == 0)
self.game.mBoard.GenerateMoves(self.game);
resolve(self.game.mBoard.mMoves);
});
} else
return ProxiedMethod(this, "getPossibleMoves", arguments);
}
exports._createInternalGame = CreateInternalGame; // do not use this
exports.PLAYER_A = 1;