[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/play/blackbox.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/play/blackbox.el [emacs-unicode-2] |
Date: |
Thu, 09 Sep 2004 08:02:29 -0400 |
Index: emacs/lisp/play/blackbox.el
diff -c emacs/lisp/play/blackbox.el:1.14.6.1
emacs/lisp/play/blackbox.el:1.14.6.2
*** emacs/lisp/play/blackbox.el:1.14.6.1 Fri Apr 16 12:50:33 2004
--- emacs/lisp/play/blackbox.el Thu Sep 9 09:36:33 2004
***************
*** 335,368 ****
(bb-update-board (propertize "O" 'help-echo "Placed ball"))))))
(defun bb-trace-ray (x y)
! (let ((result (bb-trace-ray-2
! t
! x
! (cond
! ((= x -1) 1)
! ((= x 8) -1)
! (t 0))
! y
! (cond
! ((= y -1) 1)
! ((= y 8) -1)
! (t 0)))))
! (cond
! ((eq result 'hit)
! (bb-update-board (propertize "H" 'help-echo "Hit"))
! (setq bb-score (1+ bb-score)))
! ((equal result (cons x y))
! (bb-update-board (propertize "R" 'help-echo "Reflection"))
! (setq bb-score (1+ bb-score)))
! (t
! (setq bb-detour-count (1+ bb-detour-count))
! (bb-update-board (propertize (format "%d" bb-detour-count)
! 'help-echo "Detour"))
! (save-excursion
! (bb-goto result)
! (bb-update-board (propertize (format "%d" bb-detour-count)
! 'help-echo "Detour")))
! (setq bb-score (+ bb-score 2))))))
(defun bb-trace-ray-2 (first x dx y dy)
(cond
--- 335,369 ----
(bb-update-board (propertize "O" 'help-echo "Placed ball"))))))
(defun bb-trace-ray (x y)
! (when (= (following-char) 32)
! (let ((result (bb-trace-ray-2
! t
! x
! (cond
! ((= x -1) 1)
! ((= x 8) -1)
! (t 0))
! y
! (cond
! ((= y -1) 1)
! ((= y 8) -1)
! (t 0)))))
! (cond
! ((eq result 'hit)
! (bb-update-board (propertize "H" 'help-echo "Hit"))
! (setq bb-score (1+ bb-score)))
! ((equal result (cons x y))
! (bb-update-board (propertize "R" 'help-echo "Reflection"))
! (setq bb-score (1+ bb-score)))
! (t
! (setq bb-detour-count (1+ bb-detour-count))
! (bb-update-board (propertize (format "%d" bb-detour-count)
! 'help-echo "Detour"))
! (save-excursion
! (bb-goto result)
! (bb-update-board (propertize (format "%d" bb-detour-count)
! 'help-echo "Detour")))
! (setq bb-score (+ bb-score 2)))))))
(defun bb-trace-ray-2 (first x dx y dy)
(cond
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/play/blackbox.el [emacs-unicode-2],
Miles Bader <=