summaryrefslogtreecommitdiff
path: root/chess-display.el
diff options
context:
space:
mode:
Diffstat (limited to 'chess-display.el')
-rw-r--r--chess-display.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/chess-display.el b/chess-display.el
index aba88ec..9dc80a3 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -316,6 +316,7 @@ See `chess-display-type' for the different kinds of displays."
(define-key map [?X] 'chess-display-quit)
(define-key map [?M] 'chess-display-manual-move)
(define-key map [?@] 'chess-display-remote)
+ (define-key map [? ] 'chess-display-pass)
(define-key map [?<] 'chess-display-move-first)
(define-key map [?,] 'chess-display-move-backward)
@@ -467,6 +468,13 @@ Basically, it means we are playing, not editing or reviewing."
(chess-display-set-game (chess-display-create 'chess-images t)
(chess-display-game nil))))
+(defun chess-display-pass ()
+ "Pass the move to your opponent. Only valid on the first move."
+ (interactive)
+ (when (and (chess-display-active-p)
+ (= 0 (chess-display-index nil)))
+ (chess-game-run-hooks chess-display-game 'pass)))
+
(defun chess-display-set-current (dir)
"Change the currently displayed board.
Direction may be - or +, to move forward or back, or t or nil to jump