summaryrefslogtreecommitdiff
path: root/chess-algebraic.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-07 08:44:00 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-07 08:44:00 +0000
commit2ef00c4beddb77e546cdc212cc502c5a9a4bba6c (patch)
treef20a250ce3e162fd5580696528d7b8251cdcfcf4 /chess-algebraic.el
parentb148d84be1c3bd781c4fd11dd0a928fbeeda28fd (diff)
Simplified the event model, and removed session objects. Now
everything just revolves around a game. Gnuchess is now playable to the end, except don't make moves that leave your king in check! The engine still doesn't check for this yet.
Diffstat (limited to 'chess-algebraic.el')
-rw-r--r--chess-algebraic.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/chess-algebraic.el b/chess-algebraic.el
index cd67c6a..3905659 100644
--- a/chess-algebraic.el
+++ b/chess-algebraic.el
@@ -62,6 +62,8 @@ This regexp handles both long and short form.")
(if (eq piece ?O)
(let ((rank (if color 7 0))
(long (= (length (match-string 1 move)) 5)))
+ ;; jww (2002-04-07): This should be moderated by
+ ;; chess-standard!!
(list (chess-rf-to-index rank 4)
(chess-rf-to-index rank (if long 2 6))
(chess-rf-to-index rank (if long 0 7))
@@ -104,8 +106,8 @@ This regexp handles both long and short form.")
(list (if (equal mate "#")
':checkmate
':check))))
- (assert changes)
- (apply 'chess-ply-create position changes)))
+ (and changes
+ (apply 'chess-ply-create position changes))))
(defun chess-ply-to-algebraic (ply &optional long search-func)
"Convert the given PLY to algebraic notation.