From 1fb2baed25b7459f84184e13182dd8a4d696e4b8 Mon Sep 17 00:00:00 2001 From: Lurkars Date: Wed, 19 Apr 2017 17:29:29 +0200 Subject: [PATCH] player message timing --- js/game.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/game.js b/js/game.js index 3361ab8..4089baa 100644 --- a/js/game.js +++ b/js/game.js @@ -389,16 +389,16 @@ Game.prototype.endRound = function() { if (self.playing) { self.Interface.disableRollDices(false); self.Interface.disableRestart(false); + self.Interface.showMessage("Player's turn!"); + } else { + self.Interface.showMessage("CPU's turn!", self.messageTime, function() { + if (!self.playing) { + setTimeout(function() { + self.rollDices(); + }, self.cpuspeed); + } + }); } - - self.Interface.showMessage(self.playing ? "Player's Turn!" : "CPU's turn!", self.messageTime, function() { - - if (!self.playing) { - setTimeout(function() { - self.rollDices(); - }, self.cpuspeed); - } - }); } }