Basic combat
This commit is contained in:
parent
31a0bd9a34
commit
0b164302c4
7 changed files with 636 additions and 55 deletions
15
modules/random.scm
Normal file
15
modules/random.scm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
(module (bd random) ()
|
||||
(import scheme
|
||||
(chicken base)
|
||||
(chicken module)
|
||||
(chicken random))
|
||||
|
||||
(export random)
|
||||
(export rand-int)
|
||||
(define random pseudo-random-real)
|
||||
(define rand-int pseudo-random-integer)
|
||||
|
||||
(export pick-random)
|
||||
(define (pick-random lst)
|
||||
(list-ref lst (rand-int (length lst))))
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue