diff --git a/server-helper.js b/server-helper.js index 3ed2a21..7701aa5 100644 --- a/server-helper.js +++ b/server-helper.js @@ -9,11 +9,12 @@ module.exports = class { this.timers = {}; // cron job for periodically clearing finished games + const scope = this; this.job = new CronJob('0 0 */2 * * *', function() { - console.log(this.activeGames); - for (const key in this.activeGames) { - if (this.activeGames.hasOwnProperty(key) && (Math.abs((new Date()) - (new Date(this.activeGames[key].startTime))) / 36e5) >= 2) { - delete this.activeGames[key]; + console.log(scope.activeGames); + for (const key in scope.activeGames) { + if (scope.activeGames.hasOwnProperty(key) && (Math.abs((new Date()) - (new Date(scope.activeGames[key].startTime))) / 36e5) >= 2) { + delete scope.activeGames[key]; } } console.log("Games pruned at: " + (new Date().toDateString()) + " " + (new Date()).toTimeString()); @@ -34,7 +35,7 @@ module.exports = class { game.killedRole = player.card.role; game.message = player.name + ", a " + player.card.role + ", was killed!"; console.log(game.message); - if (player.card.role === "Werewolf" && game.hasDreamWolf) { + if (player.card.isTypeOfWerewolf && game.hasDreamWolf) { this.activateDreamWolvesIfNeeded(game); } const winCheck = module.exports.teamWon(game); diff --git a/stylesheets/styles.css b/stylesheets/styles.css index 6ce63e5..bcdca31 100644 --- a/stylesheets/styles.css +++ b/stylesheets/styles.css @@ -381,7 +381,7 @@ html, body { position: absolute; bottom: 0; width: 100%; - height: 5rem; + margin-bottom: 1.5em; font-size: 0.75em; text-align: center; align-items: center; @@ -390,6 +390,36 @@ html, body { justify-content: center; } +.bmc-button span:nth-child(1) { + font-size: 20px; +} + +.bmc-button { + line-height: 35px !important; + height:40px !important; + text-decoration: none !important; + display:inline-flex !important; + align-items: center !important; + margin-bottom: 3em !important; + color:#ffffff !important; + background-color:#FF5F5F !important; + border-radius: 5px !important; + border: 1px solid transparent !important; + padding: 7px 15px 7px 10px !important; + font-size: 15px !important; + box-shadow: 0px 1px 2px rgba(190, 190, 190, 0.5) !important; + -webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important; + font-family: sitewide-sans-serif, sans-serif !important; + -webkit-box-sizing: border-box !important; + box-sizing: border-box !important; +} + +.bmc-button:hover, .bmc-button:active, .bmc-button:focus { + -webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important; + text-decoration: none !important;box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important; + opacity: 0.85 !important;color:#ffffff !important; +} + #footer div { display: flex; align-items: center; diff --git a/views/index.html b/views/index.html index fcfc0b5..04b8a35 100644 --- a/views/index.html +++ b/views/index.html @@ -28,6 +28,10 @@