1 ;;; chess-none.el --- Null engine
3 ;; Copyright (C) 2014 Free Software Foundation, Inc.
5 ;; This is free software; you can redistribute it and/or modify it under
6 ;; the terms of the GNU General Public License as published by the Free
7 ;; Software Foundation; either version 3, or (at your option) any later
10 ;; This is distributed in the hope that it will be useful, but WITHOUT
11 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
20 ;; A null engine, used when two humans play against each other on the
25 (require 'chess-engine)
27 (defvar chess-none-regexp-alist nil)
29 (defun chess-none-handler (game event &rest args)
30 "An empty chess engine, used for fielding key events.
31 This is only useful when two humans are playing each other, in which
32 case this engine will do the job of accepting undos, handling
34 (unless chess-engine-handling-event
36 ((eq event 'initialize) t)
38 ((memq event '(resign abort))
39 (chess-engine-set-position nil))
42 (chess-game-undo game (car args))))))
46 ;;; chess-none.el ends here