From aa0886cd61494a4b60a3f53a46c90c439800cc04 Mon Sep 17 00:00:00 2001 From: spinerak Date: Mon, 10 Jun 2024 18:40:11 +0200 Subject: [PATCH] iterate keys and values of a dict together --- worlds/yachtdice/Rules.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/yachtdice/Rules.py b/worlds/yachtdice/Rules.py index d6355ccf0c..8d288ce286 100644 --- a/worlds/yachtdice/Rules.py +++ b/worlds/yachtdice/Rules.py @@ -64,8 +64,8 @@ class Category: if num_dice == 0 or num_rolls == 0: return 0 mean_score = 0 - for key in yacht_weights[self.name, min(8, num_dice), min(8, num_rolls)]: - mean_score += key * yacht_weights[self.name, min(8, num_dice), min(8, num_rolls)][key] / 100000 + for key, value in yacht_weights[self.name, min(8, num_dice), min(8, num_rolls)].items(): + mean_score += key * value / 100000 return mean_score * self.quantity