From: Paul Eggert Date: Sun, 1 Aug 1993 20:50:07 +0000 (+0000) Subject: (random-number): Remove. X-Git-Tag: emacs-19.34~11449 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f7e55318b414a72cd0fc81525c2d4983a1033494;p=emacs.git (random-number): Remove. All callers changed to use `random' instead. --- diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index a403f2efddb..0bc047682b5 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el @@ -319,16 +319,11 @@ is non-nil." ;; If score is equally good, choose randomly. But first check freeness: ((not (zerop (aref gomoku-board square))) (aset gomoku-score-table square -1)) - ((= count (random-number (setq count (1+ count)))) + ((zerop (random (setq count (1+ count)))) (setq best-square square score-max score))) (setq square (1+ square))) ; try next square best-square)) - -(defun random-number (n) - "Return a random integer between 0 and N-1 inclusive." - (setq n (% (random) n)) - (if (< n 0) (- n) n)) ;;; ;;; INITIALIZING THE SCORE TABLE.