summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-03-20 01:30:04 +0100
committerTor Andersson <tor@ccxvii.net>2025-03-20 01:30:04 +0100
commit8a16b5eb275a96d9e0dfa8d37a04969b49e319f2 (patch)
treec1f56a60d494d46aadc10f1f71ce0268de154df4 /rules.js
parentad43e7881da6202aecf68b22ea5a7db469df1b8e (diff)
downloadland-and-freedom-8a16b5eb275a96d9e0dfa8d37a04969b49e319f2.tar.gz
Fix iterators of hero_points and fronts.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js8
1 files changed, 4 insertions, 4 deletions
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) {