diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-14 19:52:56 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-14 19:52:56 +0000 |
| commit | d5e9f0a3c531104936728c5a599dde77c67319b0 (patch) | |
| tree | 0868b9db313b9f15ddd9e74050171237cd8b889f /chess-announce.el | |
| parent | d881274ead232567cf80f0057031b05f5b0551bc (diff) | |
*** no comment ***
Diffstat (limited to 'chess-announce.el')
| -rw-r--r-- | chess-announce.el | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chess-announce.el b/chess-announce.el index ff1a331..ca563e0 100644 --- a/chess-announce.el +++ b/chess-announce.el @@ -44,24 +44,24 @@ The first is called one start of the announcer. The second is called with the string to announce each time. The third is called to shutdown the announcer process, if necessary.") -(defun chess-announce-available-p () t) - -(defun chess-announce-for-game (game) - "Announce the opponent's moves in GAME." - (funcall (nth 0 chess-announce-functions)) - (chess-game-add-hook game 'chess-announce-handler)) - -(defun chess-announce-handler (game ignore event &rest args) +(defun chess-announce-handler (event &rest args) "This display module presents a standard chessboard. See `chess-display-type' for the different kinds of displays." (cond + ((eq event 'initialize) + (kill-buffer (current-buffer)) + (set-buffer (generate-new-buffer " *chess-announce*")) + (funcall (nth 0 chess-announce-functions)) + t) + ((eq event 'shutdown) (funcall (nth 2 chess-announce-functions))) ((eq event 'move) - (let* ((ply (chess-game-ply game (1- (chess-game-index game)))) + (let* ((ply (chess-game-ply chess-display-game + (1- (chess-game-index chess-display-game)))) (pos (chess-ply-pos ply))) - (unless (eq (chess-game-data game 'my-color) + (unless (eq (chess-game-data chess-display-game 'my-color) (chess-pos-side-to-move pos)) (let* ((source (chess-ply-source ply)) (target (chess-ply-target ply)) |
