Function: gomoku-mode
gomoku-mode is an interactive and byte-compiled function defined in
gomoku.el.gz.
Signature
(gomoku-mode)
Documentation
Major mode for playing Gomoku against Emacs.
You and Emacs play in turn by marking a free square. You mark it with X
and Emacs marks it with O. The winner is the first to get five contiguous
marks horizontally, vertically or in diagonal.
You play by moving the cursor over the square you choose and hitting RET (gomoku-human-plays).
Other useful commands:
<down-mouse-1> gomoku-click
<down-mouse-2> gomoku-click
<drag-mouse-1> gomoku-click
<drag-mouse-2> gomoku-mouse-play
<insert> gomoku-human-plays
<kp-1> gomoku-move-sw
<kp-2> gomoku-move-down
<kp-3> gomoku-move-se
<kp-4> gomoku-move-left
<kp-6> gomoku-move-right
<kp-7> gomoku-move-nw
<kp-8> gomoku-move-up
<kp-9> gomoku-move-ne
<kp-enter> gomoku-human-plays
<left> gomoku-move-left
<mouse-1> gomoku-click
<mouse-2> gomoku-mouse-play
<right> gomoku-move-right
C-a gomoku-beginning-of-line
C-b gomoku-move-left
C-b gomoku-move-left
C-c C-b gomoku-human-takes-back
C-c C-e gomoku-emacs-plays
C-c C-p gomoku-human-plays
C-c C-r gomoku-human-resigns
C-e gomoku-end-of-line
C-f gomoku-move-right
C-f gomoku-move-right
C-n gomoku-move-down
C-n gomoku-move-down
C-p gomoku-move-up
C-p gomoku-move-up
C-x u gomoku-human-takes-back
RET gomoku-human-plays
SPC gomoku-human-plays
X gomoku-human-plays
b gomoku-move-sw
h gomoku-move-left
j gomoku-move-down
k gomoku-move-up
l gomoku-move-right
n gomoku-move-se
u gomoku-move-ne
x gomoku-human-plays
y gomoku-move-nw
In addition to any hooks its parent mode special-mode might have run,
this mode runs the hook gomoku-mode-hook, as the final or penultimate
step during initialization.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/gomoku.el.gz
;; This one is for when they set view-read-only to t: Gomoku cannot
;; allow View Mode to be activated in its buffer.
(define-derived-mode gomoku-mode special-mode "Gomoku"
"Major mode for playing Gomoku against Emacs.
You and Emacs play in turn by marking a free square. You mark it with X
and Emacs marks it with O. The winner is the first to get five contiguous
marks horizontally, vertically or in diagonal.
\\<gomoku-mode-map>
You play by moving the cursor over the square you choose and hitting \\[gomoku-human-plays].
Other useful commands:\n
\\{gomoku-mode-map}"
(gomoku-display-statistics)
(setq-local font-lock-defaults '(gomoku-font-lock-keywords t))
(setq buffer-read-only t)
(add-hook 'post-command-hook #'gomoku--intangible nil t))