diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-12 09:07:01 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-12 09:07:01 +0000 |
| commit | de037adf033425192efefb66f098037766c6932e (patch) | |
| tree | e8414ef3ac94a986ed93e9497da2f7354662f4e7 /chess-pos.el | |
| parent | e66b028def9af45cc545c973255df42c9b90cde1 (diff) | |
*** no comment ***
Diffstat (limited to 'chess-pos.el')
| -rw-r--r-- | chess-pos.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chess-pos.el b/chess-pos.el index 6c89e15..4390072 100644 --- a/chess-pos.el +++ b/chess-pos.el @@ -263,7 +263,8 @@ trying to move a blank square." (to (cadr ch)) (piece (chess-pos-piece position from))) (if (= piece ? ) - (error "Attempted piece move from blank square %s" from)) + (error "Attempted piece move from blank square %s" + (chess-index-to-coord from))) (chess-pos-set-piece position from ? ) (chess-pos-set-piece position to piece)) (setq ch (cddr ch))))) @@ -351,6 +352,9 @@ indices which indicate where a piece may have moved from." (if piece p (downcase p))))) (setq candidates (cdr candidates))) + ;; skip erroneous space requests + ((= test-piece ? )) + ;; pawn movement, which is diagonal 1 when taking, but forward ;; 1 or 2 when moving (the most complex piece, actually) ((= test-piece ?P) |
