summaryrefslogtreecommitdiff
path: root/chess-ics1.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-17 08:34:35 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-17 08:34:35 +0000
commitc171394743d2a10cfe872ce076c5a8f7269d7b2b (patch)
tree0906d6eb3a7d9e6367e22d32ea1158db2d759f53 /chess-ics1.el
parent4d1c4c72b5a9c2c0180531246389a452fc034bc8 (diff)
More general bug fixing, efficiency improvements, etc.
Diffstat (limited to 'chess-ics1.el')
-rw-r--r--chess-ics1.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/chess-ics1.el b/chess-ics1.el
index 067a67a..4d0d35c 100644
--- a/chess-ics1.el
+++ b/chess-ics1.el
@@ -63,10 +63,10 @@
(defsubst chess-ics1-draw-square (pos piece index)
"Draw a piece image at point on an already drawn display."
(save-excursion
- (goto-char pos)
- (forward-char)
- (delete-char 1)
- (insert (chess-ics1-piece-text piece))))
+ (let ((inhibit-redisplay t))
+ (goto-char pos)
+ (delete-char 3)
+ (insert ? (chess-ics1-piece-text piece) ? ))))
(defun chess-ics1-draw (position perspective)
"Draw the given POSITION from PERSPECTIVE's point of view.
@@ -76,8 +76,7 @@ PERSPECTIVE is t for white or nil for black."
(erase-buffer)
(let* ((inverted (not perspective))
(rank (if inverted 7 0))
- (file (if inverted 7 0))
- beg)
+ (file (if inverted 7 0)) beg)
(insert "\n +---+---+---+---+---+---+---+---+\n")
(while (if inverted (>= rank 0) (< rank 8))
(if (/= rank (if inverted 7 0))