From 4ff9794fa2b545134efe341ad012667c67f70d15 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Sat, 15 Nov 2025 20:09:51 +0100 Subject: Added the changes to include the game counting --- src/manage.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/manage.js') diff --git a/src/manage.js b/src/manage.js index f8fe220..6ed58bd 100644 --- a/src/manage.js +++ b/src/manage.js @@ -38,7 +38,7 @@ export class Manager { return i.render(); }) .join(""); - let elementId = this.data[0].description + "_list"; + let elementId = this.data[0].description + "-list"; document.getElementById(elementId).innerHTML = renderedHTML; this.addBehaviour(); } @@ -111,12 +111,14 @@ export class GuestManager extends Manager { active() { return normalize(super.active()); } - update(list) { + incrementGames(list) { for (let index = 0; index < this.data.length; index++ ){ - if (this.data[index].name in list) { + if (list.includes(this.data[index].name)) { + console.log("Added game count to " + this.data[index].name); this.data[index].games += 1; } } + this.store(); } } -- cgit v1.3.1