Skip to content

Commit ab84481

Browse files
committed
Objects Challenges: Remove double call to Math.random()
1 parent e5a2d1a commit ab84481

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/objects/challenges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Broom {
3434
class Witch {
3535
Object pullFromHat() {
3636
double r = Math.random();
37-
if (Math.random() < 0.25) {
37+
if (r < 0.25) {
3838
return new Spell("Ensmallen");
3939
}
4040
else if (r < 0.5) {

0 commit comments

Comments
 (0)