summaryrefslogtreecommitdiff
path: root/chess-none.el
blob: db628bf7ee59a1df7807520bedbcf3c35bcc9caf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; A null engine, used when two humans play each on the same display.
;;
;; $Revision$

(require 'chess-engine)

(defun chess-none-handler (event &rest args)
  "Initialize the network chess engine."
  (cond
   ((eq event 'send))

   ((memq event '(resign abort))
    (and (chess-engine-game nil)
	 (chess-engine-set-start-position nil)))

   ((eq event 'undo)
    (if (chess-engine-game nil)
	(chess-game-undo (chess-engine-game nil) (car args))))))

(provide 'chess-none)

;;; chess-none.el ends here