Pig the dice game/Player: Difference between revisions

Line 2,297:
 
=={{header|Racket}}==
 
{{output?|Racket}}
Same as [[Pig_the_dice_game#Racket]], with three strategy makers, and
simulation code for trying out strategies.
<lang racket>#lang racket
#lang racket
 
(define (pig-the-dice #:print? [print? #t] . players)
Line 2,346 ⟶ 2,345:
;; (n-runs 1000 (n-random 2) (n-random 3) (n-random 4))
;; (n-runs 1000 (n-rounds 5) (n-points 24))
;; (n-runs 1000 (n-rounds 5) (n-random 2))</lang>
</lang>
The following example run demonstrates the output from
<lang Racket>(pig-the-dice #:print? #t (n-points 12) (n-rounds 4))</lang>
Anonymous user