[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 168/255: adding option to play a sound during moves
From: |
Eric Schulte |
Subject: |
[elpa] 168/255: adding option to play a sound during moves |
Date: |
Sun, 16 Mar 2014 01:02:41 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit 5ae676f28a5bbab6914de5b2c21dc492362652f6
Author: Eric Schulte <address@hidden>
Date: Tue Jun 5 15:02:02 2012 -0600
adding option to play a sound during moves
---
go-board.el | 7 +++++++
stone.wav | Bin 0 -> 6754 bytes
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/go-board.el b/go-board.el
index 2bec034..448e0c1 100644
--- a/go-board.el
+++ b/go-board.el
@@ -45,6 +45,12 @@
(defvar *go-board-overlays* nil
"List of overlays carrying GO board painting information.")
+(defvar go-board-use-move-sound nil)
+(defvar go-board-move-sound
+ `(sound :file ,(expand-file-name "stone.wav"
+ (file-name-directory
+ (or load-file-name (buffer-file-name))))))
+
;;; Board manipulation functions
(defun make-board (size) (make-vector (* size size) nil))
@@ -69,6 +75,7 @@
(defun apply-turn-to-board (moves)
(let ((board (pieces-to-board (car *history*) *size*)))
(clear-labels board)
+ (when go-board-use-move-sound (play-sound go-board-move-sound))
(dolist (move moves) (apply-move board move))
(push (board-to-pieces board) *history*)
(update-display (current-buffer))))
diff --git a/stone.wav b/stone.wav
new file mode 100644
index 0000000..253078f
Binary files /dev/null and b/stone.wav differ
- [elpa] 150/255: more lenient regexp for matching game listing, (continued)
- [elpa] 150/255: more lenient regexp for matching game listing, Eric Schulte, 2014/03/15
- [elpa] 152/255: Revert "improved the setf method for aget", Eric Schulte, 2014/03/15
- [elpa] 154/255: don't quit main back-end when quitting a board, Eric Schulte, 2014/03/15
- [elpa] 158/255: beginning to translate svg images into elisp, Eric Schulte, 2014/03/15
- [elpa] 149/255: push all buffer-local variables into an igs object, Eric Schulte, 2014/03/15
- [elpa] 162/255: painting a nice svg board, but more to do, Eric Schulte, 2014/03/15
- [elpa] 159/255: translated all svg stone images into elisp, Eric Schulte, 2014/03/15
- [elpa] 164/255: prompt before quitting, Eric Schulte, 2014/03/15
- [elpa] 153/255: safety measure when observing igs games, Eric Schulte, 2014/03/15
- [elpa] 163/255: sorted out different types of backgrounds, Eric Schulte, 2014/03/15
- [elpa] 168/255: adding option to play a sound during moves,
Eric Schulte <=
- [elpa] 155/255: less permissive igs move regular expression, Eric Schulte, 2014/03/15
- [elpa] 166/255: board images working with backgrounds, Eric Schulte, 2014/03/15
- [elpa] 173/255: start gnugo process when object is created, Eric Schulte, 2014/03/15
- [elpa] 167/255: cleanup images in board faces, Eric Schulte, 2014/03/15
- [elpa] 170/255: fix spacing of labels when using image for display, Eric Schulte, 2014/03/15
- [elpa] 174/255: quit the main back-end as well, Eric Schulte, 2014/03/15
- [elpa] 160/255: removing stones/ directory, Eric Schulte, 2014/03/15
- [elpa] 175/255: support for playing different types of games, Eric Schulte, 2014/03/15
- [elpa] 157/255: images of stones, Eric Schulte, 2014/03/15
- [elpa] 177/255: future tasks, Eric Schulte, 2014/03/15