summaryrefslogtreecommitdiff
path: root/chess-var.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-18 18:30:19 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-18 18:30:19 +0000
commit563cf2037068f67f6786172b029363aaa7d52776 (patch)
tree549c69928ccc019093fed062f6999462fbb431db /chess-var.el
parent2b0db13d4cdc3aaadd7dd458c1097c668577a072 (diff)
Many efficiency improvements and bug fixes.
Diffstat (limited to 'chess-var.el')
-rw-r--r--chess-var.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/chess-var.el b/chess-var.el
index 95586cb..851d06d 100644
--- a/chess-var.el
+++ b/chess-var.el
@@ -47,8 +47,7 @@ Optionally use the given starting POSITION.
SEARCH-FUNC specifies the function used to test the legality of moves.
TAGS is the starting set of var tags (which can always be changed
later using the various tag-related methods)."
- (list (chess-ply-create* (or position (chess-pos-create))
- (null position))))
+ (list (chess-ply-create* (or position chess-starting-position))))
(defun chess-var-move (var ply)
"Make a move in the current VAR, from FROM to TO.
@@ -60,10 +59,10 @@ progress (nil), if it is drawn, resigned, mate, etc."
(position (chess-ply-pos ply)))
(if (chess-ply-final-p current-ply)
(chess-error 'add-to-completed))
- (assert (equal position (chess-ply-pos current-ply)))
+ (assert (eq position (chess-ply-pos current-ply)))
(chess-ply-set-changes current-ply changes)
(chess-var-add-ply var (chess-ply-create*
- (chess-ply-next-pos current-ply) t))))
+ (chess-ply-next-pos current-ply)))))
(provide 'chess-var)