summaryrefslogtreecommitdiff
path: root/chess-game.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-03-02 05:44:37 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-03-02 05:44:37 +0000
commit63ec14391807a518bc9a4378a57e802e9a8f41dd (patch)
treeb7633863c00fd94642d8288cd1c7b61acf37bd60 /chess-game.el
parentfd30bf2f06812776a8aea2129094177346e90ded (diff)
Removed some redundant functions.
Diffstat (limited to 'chess-game.el')
-rw-r--r--chess-game.el16
1 files changed, 1 insertions, 15 deletions
diff --git a/chess-game.el b/chess-game.el
index c48816a..177e163 100644
--- a/chess-game.el
+++ b/chess-game.el
@@ -60,24 +60,10 @@
"Return the GAME's current position index."
(length (cdr game)))
-(defsubst chess-index-side-to-move (index)
- "Return the color of the side which has the move."
- (= (mod index 2) 1))
-
(defsubst chess-game-seq (game)
"Return the current GAME sequence."
(1+ (/ (chess-game-index game) 2)))
-(defsubst chess-game-side-to-move (game)
- "Return the color of the side which has the move."
- (chess-index-side-to-move (chess-game-index game)))
-
-(defun chess-game-move-color (game &optional invert)
- "Return the capitalized color name associated with the side to move."
- (if (if (chess-game-side-to-move game)
- (not invert) invert)
- "White" "Black"))
-
(defun chess-game-ply (game &optional index)
"Return the position related to GAME's INDEX position."
(if index
@@ -121,7 +107,7 @@ progress (nil), if it is drawn, resigned, mate, etc."
((or (memq ':resign changes)
(memq ':checkmate changes))
(chess-game-set-tag game "Result"
- (if (chess-game-side-to-move game)
+ (if (chess-pos-side-to-move (chess-game-pos game))
"0-1" "1-0")))
(t (nconc (cdr game)
(list (chess-ply-create