Function: landmark-check-filled-qtuple

landmark-check-filled-qtuple is a byte-compiled function defined in landmark.el.gz.

Signature

(landmark-check-filled-qtuple SQUARE VALUE DX DY)

Documentation

Return t if SQUARE belongs to a qtuple filled with VALUEs along DX, DY.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/landmark.el.gz
(defun landmark-check-filled-qtuple (square value dx dy)
  "Return t if SQUARE belongs to a qtuple filled with VALUEs along DX, DY."
  (let ((a 0) (b 0)
	(left square) (right square)
	(depl (landmark-xy-to-index dx dy)))
    (while (and (> a -4)		; stretch tuple left
		(= value (aref landmark-board (setq left (- left depl)))))
      (setq a (1- a)))
    (while (and (< b (+ a 4))		; stretch tuple right
		(= value (aref landmark-board (setq right (+ right depl)))))
      (setq b (1+ b)))
    (cond ((= b (+ a 4))		; tuple length = 5 ?
	   (landmark-cross-qtuple (+ square (* a depl)) (+ square (* b depl))
				dx dy)
	   t))))