summaryrefslogtreecommitdiff
path: root/chess-game.el
diff options
context:
space:
mode:
Diffstat (limited to 'chess-game.el')
-rw-r--r--chess-game.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/chess-game.el b/chess-game.el
index 900710b..05bce02 100644
--- a/chess-game.el
+++ b/chess-game.el
@@ -191,9 +191,7 @@ This conveys the status of the game at the given index."
(assert game)
(let ((index (chess-game-index game)))
(if (> index 1)
- (if (= (mod index 2) 0)
- (/ index 2)
- (1+ (/ index 2)))
+ (+ 1 (mod index 2) (/ index 2))
1)))
(defsubst chess-game-side-to-move (game &optional index)