fixed metamachy

This commit is contained in:
mig 2017-05-06 10:02:20 +02:00
parent bccacc59e0
commit 840cf4e566
2 changed files with 12 additions and 8 deletions

View file

@ -121,10 +121,13 @@ if(window.JoclyXdViewCleanup)
HTStateMachine.prototype=new JHStateMachine();
HTStateMachine.prototype.smError=function() {
//console.info("=>",arguments);
}
HTStateMachine.prototype.smWarning=function() {
//console.info("=>",arguments);
};
HTStateMachine.prototype.smDebug=function() {
//console.info("=>",arguments);
}
function Diff(oOld,oNew) {
@ -2940,7 +2943,7 @@ if(window.JoclyXdViewCleanup)
htsm.smLeaving("S_WAIT_ACTION",[ Clean ]);
htsm.smTransition("S_WAIT_ACTION", "E_ACTION", "S_ACTION", [ PushAction, Validate, Action ]);
htsm.smTransition("S_WAIT_ACTION", "E_CANCEL", null, [ Cancel, Clean, PrepareAction, SetCancel]);
htsm.smTransition("S_WAIT_ACTION", "E_MOVE_DONE", "S_DONE", [ SendMove ]);
htsm.smTransition("S_WAIT_ACTION", "E_MOVE_DONE", "S_DONE", [ SendMove, HideFurnitures ]);
htsm.smTransition(["S_WAIT_ACTION","S_ACTION"], "E_END", "S_DONE", [ ]);
htsm.smTransition("S_ACTION", "E_DONE", "S_WAIT_ACTION", [ PostAction ]);
htsm.smTransition("S_DONE", "E_END", null, [ HideFurnitures ]);

View file

@ -161,14 +161,15 @@ JocGame.prototype.PlayMove = function(move) {
self.mOldBoard=new (self.GetBoardClass())(self);
self.mOldBoard.CopyFrom(self.mBoard);
self.ApplyMove(move);
var moveShown = self.mBoard.PlayedMove(self,move);
if(moveShown)
self.MoveShown = function() {
delete self.MoveShown;
resolve();
else
self.MoveShown = function() {
delete self.MoveShown;
resolve();
}
}
var moveShown = self.mBoard.PlayedMove(self,move);
if(moveShown) {
delete self.MoveShown;
resolve();
}
});
return promise;
}