Function: gomoku-find-filled-qtuple

gomoku-find-filled-qtuple is a byte-compiled function defined in gomoku.el.gz.

Signature

(gomoku-find-filled-qtuple SQUARE VALUE)

Documentation

Return t if SQUARE belongs to a qtuple filled with VALUEs.

Source Code

;; Defined in /usr/src/emacs/lisp/play/gomoku.el.gz
;;;
;;; CROSSING WINNING QTUPLES.
;;;

;; When someone succeeds in filling a qtuple, we draw a line over the five
;; corresponding squares. One problem is that the program does not know which
;; squares ! It only knows the square where the last move has been played and
;; who won. The solution is to scan the board along all four directions.

(defun gomoku-find-filled-qtuple (square value)
  "Return t if SQUARE belongs to a qtuple filled with VALUEs."
  (or (gomoku-check-filled-qtuple square value 1 0)
      (gomoku-check-filled-qtuple square value 0 1)
      (gomoku-check-filled-qtuple square value 1 1)
      (gomoku-check-filled-qtuple square value -1 1)))