added match method getPossibleMoves
This commit is contained in:
parent
6dab9eed00
commit
8b463b27f7
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue