diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-16 02:43:19 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-16 02:43:19 +0000 |
| commit | bd0bd1965bbc3a18c0f5a218e417778c295bdd1f (patch) | |
| tree | c58096b7b958fedf501f98b5cf46c88c723861f7 /chess-var.el | |
| parent | 40eddef43dfde4f1f14101e1f3bbc0d4621c8a37 (diff) | |
Major speed improvement and efficiency work. chess-legal-plies is
much more memory conservative now. Reduced recursion in
chess-search-position by a slight bit.
Diffstat (limited to 'chess-var.el')
| -rw-r--r-- | chess-var.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chess-var.el b/chess-var.el index f5c789a..55be268 100644 --- a/chess-var.el +++ b/chess-var.el @@ -48,7 +48,8 @@ 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))))) + (list (chess-ply-create* (or position (chess-pos-create)) + (null position)))) (defun chess-var-move (var ply) "Make a move in the current VAR, from FROM to TO. @@ -62,8 +63,8 @@ progress (nil), if it is drawn, resigned, mate, etc." (chess-error 'add-to-completed)) (assert (equal 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))))) + (chess-var-add-ply var (chess-ply-create* + (chess-ply-next-pos current-ply) t)))) (provide 'chess-var) |
