Trailing whitepace deleted.
[bpt/emacs.git] / lisp / play / life.el
index 9645cb3..c3bc0b3 100644 (file)
@@ -1,8 +1,8 @@
 ;;; life.el --- John Horton Conway's `Life' game for GNU Emacs
 
-;; Copyright (C) 1988 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 2001 Free Software Foundation, Inc.
 
-;; Author: Kyle Jones <talos!kjones@uunet.uu.net>
+;; Author: Kyle Jones <kyleuunet.uu.net>
 ;; Keywords: games
 
 ;; This file is part of GNU Emacs.
@@ -53,7 +53,7 @@
     "         @@      " "          @@     " "           @@    "
     "            @@   " "             @@  " "              @@ "
     "               @@")
-   ("@@@@@@@@@" "@   @   @" "@ @@@@@ @" "@ @   @ @" "@@@   @@@" 
+   ("@@@@@@@@@" "@   @   @" "@ @@@@@ @" "@ @   @ @" "@@@   @@@"
     "@ @   @ @" "@ @@@@@ @" "@   @   @" "@@@@@@@@@")]
   "Vector of rectangles containing some Life startup patterns.")
 
@@ -106,14 +106,13 @@ generations (this defaults to 1)."
   (setq life-initialized t)
   (or sleeptime (setq sleeptime 1))
   (life-setup)
-  (life-display-generation sleeptime)
   (catch 'life-exit
     (while t
       (let ((inhibit-quit t))
+       (life-display-generation sleeptime)
        (life-grim-reaper)
        (life-expand-plane-if-needed)
-       (life-increment-generation)
-       (life-display-generation sleeptime)))))
+       (life-increment-generation)))))
 
 (defalias 'life-mode 'life)
 (put 'life-mode 'mode-class 'special)
@@ -188,7 +187,7 @@ generations (this defaults to 1)."
 (defun life-grim-reaper ()
   ;; Clear the match information.  Later we check to see if it
   ;; is still clear, if so then all the cells have died.
-  (store-match-data nil)
+  (set-match-data nil)
   (goto-char (point-min))
   ;; For speed declare all local variable outside the loop.
   (let (point char pivot living-neighbors list)
@@ -266,7 +265,7 @@ generations (this defaults to 1)."
 (defun life-display-generation (sleeptime)
   (goto-char life-window-start)
   (recenter 0)
-  
+
   ;; Redisplay; if the user has hit a key, exit the loop.
   (or (eq t (sit-for sleeptime))
       (throw 'life-exit nil)))