diff options
author | Eric S. Raymond <esr@snark.thyrsus.com> | 1993-03-22 03:27:18 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@snark.thyrsus.com> | 1993-03-22 03:27:18 +0000 |
commit | e41b2db1da153e3ead4a01cb6e729cb99cad78ae (patch) | |
tree | b1a9c9c673da674b66521088f3247ac5a34f5a02 /lisp/play | |
parent | 33d92c1f9de704cda9309731b4d6add46178aafc (diff) | |
download | emacs-e41b2db1da153e3ead4a01cb6e729cb99cad78ae.tar.gz |
Added or corrected Commentary sections
Diffstat (limited to 'lisp/play')
-rw-r--r-- | lisp/play/dissociate.el | 5 | ||||
-rw-r--r-- | lisp/play/doctor.el | 6 | ||||
-rw-r--r-- | lisp/play/hanoi.el | 29 | ||||
-rw-r--r-- | lisp/play/life.el | 6 |
4 files changed, 46 insertions, 0 deletions
diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el index d399212a441..ebf6b637a8d 100644 --- a/lisp/play/dissociate.el +++ b/lisp/play/dissociate.el @@ -21,6 +21,11 @@ ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;;; Commentary: + +;; The single entry point, `dissociatesd-press', applies a travesty +;; generator to the current buffer. The results can be quite amusing. + ;;; Code: ;;;###autoload diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 315c4cc11f7..702f053b25e 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -21,6 +21,12 @@ ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;;; Commentary: + +;; The single entry point `doctor', simulates a Rogerian analyst using +;; phrase-production techniques similar to the classic ELIZA demonstration +;; of pseudo-AI. + ;;; Code: (defun doctor-cadr (x) (car (cdr x))) diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el index e65608235fd..99e2acdd92a 100644 --- a/lisp/play/hanoi.el +++ b/lisp/play/hanoi.el @@ -8,6 +8,35 @@ ; This is in the public domain ; since he distributed it without copyright notice in 1985. +;;; Commentary: + +;; Solves the Towers of Hanoi puzzle while-U-wait. +;; +;; The puzzle: Start with N rings, decreasing in sizes from bottom to +;; top, stacked around a post. There are two other posts. Your mission, +;; should you choose to accept it, is to shift the pile, stacked in its +;; original order, to another post. +;; +;; The challenge is to do it in the fewest possible moves. Each move +;; shifts one ring to a different post. But there's a rule; you can +;; only stack a ring on top of a larger one. +;; +;; The simplest nontrivial version of this puzzle is N = 3. Solution +;; time rises as 2**N, and programs to solve it have long been considered +;; classic introductory exercises in the use of recursion. +;; +;; The puzzle is called `Towers of Hanoi' because an early popular +;; presentation wove a fanciful legend around it. According to this +;; myth (uttered long before the Vietnam War), there is a Buddhist +;; monastery at Hanoi which contains a large room with three time-worn +;; posts in it surrounded by 21 golden discs. Monks, acting out the +;; command of an ancient prophecy, have been moving these disks, in +;; accordance with the rules of the puzzle, once every day since the +;; monastery was founded over a thousand years ago. They are said +;; believe that when the last move of the puzzle is completed, the +;; world will end in a clap of thunder. Fortunately, they are nowhere +;; even close to being done... + ;;; Code: ;;; diff --git a/lisp/play/life.el b/lisp/play/life.el index 8b8c34b4b98..8e1732ed303 100644 --- a/lisp/play/life.el +++ b/lisp/play/life.el @@ -21,6 +21,12 @@ ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;;; Commentary: + +;; A demonstrator for John Horton Conway's "Life" cellular automaton +;; in Emacs Lisp. Picks a random one of a set of interesting Life +;; patterns and avolves it according to the familiar rules. + ;;; Code: (defconst life-patterns |