From ab8448106f5b16bb3d7b0d38c25611ff36893616 Mon Sep 17 00:00:00 2001 From: Maia Everett Date: Sat, 30 Aug 2025 20:10:41 +0300 Subject: [PATCH] Objects Challenges: Remove double call to Math.random() --- src/objects/challenges.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objects/challenges.md b/src/objects/challenges.md index 00f327b..ae8cb16 100644 --- a/src/objects/challenges.md +++ b/src/objects/challenges.md @@ -34,7 +34,7 @@ class Broom { class Witch { Object pullFromHat() { double r = Math.random(); - if (Math.random() < 0.25) { + if (r < 0.25) { return new Spell("Ensmallen"); } else if (r < 0.5) {