diff options
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) |
