Function: gomoku-human-takes-back

gomoku-human-takes-back is an interactive and byte-compiled function defined in gomoku.el.gz.

Signature

(gomoku-human-takes-back)

Documentation

Signal to the Gomoku program that you wish to take back your last move.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/play/gomoku.el.gz
(defun gomoku-human-takes-back ()
  "Signal to the Gomoku program that you wish to take back your last move."
  (interactive nil gomoku-mode)
  (gomoku-switch-to-window)
  (cond
   (gomoku-emacs-is-computing
    (gomoku-crash-game))
   ((not gomoku-game-in-progress)
    (message "Too late for taking back...")
    (sit-for 4)
    (gomoku-prompt-for-other-game))
   ((zerop gomoku-number-of-human-moves)
    (message "You have not played yet...  Your move?"))
   (t
    (message "One moment, please...")
    ;; It is possible for the user to let Emacs play several consecutive
    ;; moves, so that the best way to know when to stop taking back moves is
    ;; to count the number of human moves:
    (setq gomoku-human-took-back t)
    (let ((number gomoku-number-of-human-moves))
      (while (= number gomoku-number-of-human-moves)
	(gomoku-take-back)))
    (gomoku-prompt-for-move))))