From 5c9236031038212d268da2807c2de624b7da9f83 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 18 Aug 2021 00:08:23 -0400 Subject: [PATCH] convert a few variables to const. --- src/engine.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine.jsx b/src/engine.jsx index 4e9cdc854..a58a6e2ce 100644 --- a/src/engine.jsx +++ b/src/engine.jsx @@ -608,9 +608,9 @@ const Engine = { // Main Game Loop idleTimer: function() { // Get time difference - var _thisUpdate = new Date().getTime(); - var diff = _thisUpdate - Engine._lastUpdate; - var offset = diff % Engine._idleSpeed; + const _thisUpdate = new Date().getTime(); + let diff = _thisUpdate - Engine._lastUpdate; + const offset = diff % Engine._idleSpeed; // Divide this by cycle time to determine how many cycles have elapsed since last update diff = Math.floor(diff / Engine._idleSpeed); @@ -626,7 +626,7 @@ const Engine = { }, updateGame: function(numCycles = 1) { - var time = numCycles * Engine._idleSpeed; + const time = numCycles * Engine._idleSpeed; if (Player.totalPlaytime == null) {Player.totalPlaytime = 0;} if (Player.playtimeSinceLastAug == null) {Player.playtimeSinceLastAug = 0;} if (Player.playtimeSinceLastBitnode == null) {Player.playtimeSinceLastBitnode = 0;}