From 95a880409446e3f163753fe30e17e20741fbe092 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sun, 4 Jun 2023 00:17:50 +0100 Subject: [PATCH] reset the number of attempts --- examples/hyperspace-roll/src/level_generation.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/hyperspace-roll/src/level_generation.rs b/examples/hyperspace-roll/src/level_generation.rs index 5c190495..646f30cc 100644 --- a/examples/hyperspace-roll/src/level_generation.rs +++ b/examples/hyperspace-roll/src/level_generation.rs @@ -91,6 +91,7 @@ pub fn generate_upgrades(level: u32, call: &mut dyn FnMut()) -> Vec { } if attempts > 100 { + attempts = 0; upgrades.clear(); } }