From 65b8679a7b95e149fb19db9463bf51d069719426 Mon Sep 17 00:00:00 2001 From: MartinPJB <29103374+MartinPJB@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:29:44 +0100 Subject: [PATCH] Fixes --- js/core/game.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/core/game.js b/js/core/game.js index c2e8c90..c5f7526 100644 --- a/js/core/game.js +++ b/js/core/game.js @@ -13,6 +13,7 @@ export default class Game { this.button = document.getElementById(id); this.clicks = 0; this.clicksAdder = 0; + this.clicksPerSecondAdder = 0; this.lastClickTime = 0; this.store = null; @@ -32,6 +33,8 @@ export default class Game { * Interval handler. */ interval() { + console.log(this.clicksPerSecondAdder); + this.clicks += 1 * this.clicksPerSecondAdder; this.renderSpan(); } @@ -124,6 +127,7 @@ export default class Game { resetGameProperties() { this.clicks = 0; this.clicksAdder = 0; + this.clicksPerSecondAdder = 0; this.lastClickTime = 0; this.store = null; this.clickIntervals = [];