From 8a16b5eb275a96d9e0dfa8d37a04969b49e319f2 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 20 Mar 2025 01:30:04 +0100 Subject: Fix iterators of hero_points and fronts. --- rules.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 9dd728d..714a227 100644 --- a/rules.js +++ b/rules.js @@ -2167,8 +2167,8 @@ function determine_winner() { resolve_active_and_proceed(); } function end_of_turn() { - Object.keys(game.fronts).forEach((front_id) => { - game.fronts[front_id].contributions = []; + game.fronts.forEach(front => { + front.contributions = []; }); game.active_abilities = []; game.used_medallions = []; @@ -2902,8 +2902,8 @@ function get_source_name(source) { function get_factions_with_most_hero_poins() { let most_hero_points = null; let faction_ids = []; - Object.entries(game.hero_points).forEach(([id, value]) => { - if (id === 'pool') { + game.hero_points.forEach((value, id) => { + if (id === POOL_ID) { return; } if (most_hero_points === null || value > most_hero_points) { -- cgit v1.2.3