Mercurial > emacs
changeset 4402:3cd121df96c8
(random-number): Remove.
All callers changed to use `random' instead.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Sun, 01 Aug 1993 20:50:07 +0000 |
parents | c5e18576d5f1 |
children | 2d6328c324cd |
files | lisp/play/gomoku.el |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/play/gomoku.el Sun Aug 01 20:50:07 1993 +0000 +++ b/lisp/play/gomoku.el Sun Aug 01 20:50:07 1993 +0000 @@ -319,16 +319,11 @@ ;; 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.