r4362: Automatic commit for debian_version_1_0_3
[reversi.git] / io-clim.lisp
index ff5bfd3ad0a53a48e8abb5a0c017ae871c3387e1..e0146f5bb825bb0133edc486ae57fc19a75795cf 100644 (file)
@@ -8,7 +8,7 @@
 ;;;;  Programer:      Kevin M. Rosenberg
 ;;;;  Date Started:   1 Nov 2001
 ;;;;
-;;;; $Id: io-clim.lisp,v 1.5 2003/03/22 17:19:15 kevin Exp $
+;;;; $Id: io-clim.lisp,v 1.9 2003/04/03 16:29:52 kevin Exp $
 ;;;;
 ;;;; This file is Copyright (c) 2001-2002 by Kevin M. Rosenberg 
 ;;;;
                                                    record stream state)
   state
   (multiple-value-bind (xoff yoff)
-      (convert-from-relative-to-absolute-coordinates 
+      (clim::convert-from-relative-to-absolute-coordinates 
        stream (output-record-parent record))
     (with-bounding-rectangle* (left top right bottom) record
       (draw-rectangle* stream
                (format stream "Valid Moves~%~A" 
                        (list-to-delimited-string legal-moves #\space)))))
        (when (null (player game))
-         (if (plusp (final-result game))
-             (format stream "Black wins by ~d!" (final-result game))
-           (format stream "White wins by ~d!" (- 0 (final-result game)))))))))
+         (cond
+           ((zerop (final-result games))
+            (format stream "It's a draw!"))
+           ((plusp (final-result game))
+             (format stream "Black wins by ~d!" (final-result game)))
+           (t
+            (format stream "White wins by ~d!" (- 0 (final-result game))))))))))
 
 
 
                  (+ label-height (* cell-height i)
                       half-cell-inner-height))
                 :align-x :left :align-y :center))
-    (stream-set-cursor-position stream label-width label-height)
+    (if (find-package 'mcclim)
+       (setf (stream-set-cursor-position stream)
+             (values label-width label-height))
+       (stream-set-cursor-position stream label-width label-height))
     (surrounding-output-with-border (stream)
       (formatting-table (stream :y-spacing 0 :x-spacing 0)
        (dotimes (row 8)