Permalink
Browse files

Get rid of using the obsolete `shuffle' procedure

  • Loading branch information...
1 parent 787665c commit fbaf20fd3c8d7d0f299220876b994e6825eeb88c Moritz Heidkamp committed May 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 kalaha.scm
View
2 kalaha.scm
@@ -173,7 +173,7 @@
(define (make-random-opponent-turn)
(let ((opp (filter (lambda (p) (> (pit-count p) 0)) pits-opponent)))
(unless (null? opp)
- (let ((pit (car (shuffle opp random))))
+ (let ((pit (list-ref opp (random (length opp)))))
(set-focus! pit)
(make-turn 'opponent kalaha-opponent pit)))))

0 comments on commit fbaf20f

Please sign in to comment.