]> gitweb.factorcode.org Git - factor.git/commitdiff
dice: fix for recent random refactoring
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 26 Feb 2023 22:17:10 +0000 (14:17 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 26 Feb 2023 22:17:10 +0000 (14:17 -0800)
extra/dice/dice.factor

index deb1dada57697b42dc756b452eafdd23f459d87b..947640e491faeec524c6f15dc996cefb9af984d6 100644 (file)
@@ -4,8 +4,8 @@ USING: kernel lexer math math.parser namespaces
 random random.private sequences splitting ;
 IN: dice
 
-: (random-roll) ( #dice #sides obj -- n )
-    [ 0 ] 3dip '[ _ _ (random-integer) + 1 + ] times ;
+: (random-roll) ( #dice #sides rnd -- n )
+    [ 0 ] 3dip '[ _ _ random* + 1 + ] times ;
 
 : random-roll ( #dice #sides -- n )
     random-generator get (random-roll) ;