make ctrl function private

pull/840/head
Thibault Duplessis 2015-08-25 13:01:31 +02:00
parent 923fc872af
commit 577a0305e3
1 changed files with 3 additions and 5 deletions

View File

@ -142,10 +142,8 @@ module.exports = function(opts) {
});
}.bind(this);
this.showYourMoveNotification = function() {
if (game.isPlayerTurn(this.data)) {
lichess.desktopNotification("It's your move!");
}
var showYourMoveNotification = function() {
if (game.isPlayerTurn(this.data)) lichess.desktopNotification("It's your move!");
}.bind(this);
this.apiMove = function(o) {
@ -160,7 +158,7 @@ module.exports = function(opts) {
d[d.player.color === 'black' ? 'player' : 'opponent'].offeringDraw = o.bDraw;
d.possibleMoves = d.player.color === d.game.player ? o.dests : null;
this.setTitle();
this.showYourMoveNotification();
showYourMoveNotification();
if (!this.replaying()) {
this.vm.ply++;
this.chessground.apiMove(o.uci.substr(0, 2), o.uci.substr(2, 2));