/[emacs]/emacs/lisp/play/gomoku.el
ViewVC logotype

Diff of /emacs/lisp/play/gomoku.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by rms, Wed Nov 21 11:03:35 2001 UTC revision 1.34 by pj, Thu Dec 20 18:19:23 2001 UTC
# Line 947  If the game is finished, this command re Line 947  If the game is finished, this command re
947      (message "Chicken !")))      (message "Chicken !")))
948    
949  (defun gomoku-offer-a-draw ()  (defun gomoku-offer-a-draw ()
950    "Offer a draw and return T if Human accepted it."    "Offer a draw and return t if Human accepted it."
951    (or (y-or-n-p "I offer you a draw. Do you accept it ")    (or (y-or-n-p "I offer you a draw. Do you accept it ")
952        (not (setq gomoku-human-refused-draw t))))        (not (setq gomoku-human-refused-draw t))))
953    
# Line 1095  If the game is finished, this command re Line 1095  If the game is finished, this command re
1095  ;; who won. The solution is to scan the board along all four directions.  ;; who won. The solution is to scan the board along all four directions.
1096    
1097  (defun gomoku-find-filled-qtuple (square value)  (defun gomoku-find-filled-qtuple (square value)
1098    "Return T if SQUARE belongs to a qtuple filled with VALUEs."    "Return t if SQUARE belongs to a qtuple filled with VALUEs."
1099    (or (gomoku-check-filled-qtuple square value 1 0)    (or (gomoku-check-filled-qtuple square value 1 0)
1100        (gomoku-check-filled-qtuple square value 0 1)        (gomoku-check-filled-qtuple square value 0 1)
1101        (gomoku-check-filled-qtuple square value 1 1)        (gomoku-check-filled-qtuple square value 1 1)
1102        (gomoku-check-filled-qtuple square value -1 1)))        (gomoku-check-filled-qtuple square value -1 1)))
1103    
1104  (defun gomoku-check-filled-qtuple (square value dx dy)  (defun gomoku-check-filled-qtuple (square value dx dy)
1105    "Return T if SQUARE belongs to a qtuple filled  with VALUEs along DX, DY."    "Return t if SQUARE belongs to a qtuple filled  with VALUEs along DX, DY."
1106    (let ((a 0) (b 0)    (let ((a 0) (b 0)
1107          (left square) (right square)          (left square) (right square)
1108          (depl (gomoku-xy-to-index dx dy)))          (depl (gomoku-xy-to-index dx dy)))

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26