;;;; Programer: Kevin M. Rosenberg
;;;; Date Started: 1 Nov 2001
;;;;
-;;;; $Id: io-clim.lisp,v 1.7 2003/04/01 17:59:51 kevin Exp $
+;;;; $Id: io-clim.lisp,v 1.10 2003/05/01 19:26:46 kevin Exp $
;;;;
;;;; This file is Copyright (c) 2001-2002 by Kevin M. Rosenberg
;;;;
(in-package :reversi)
+#+mcclim (shadowing-import 'clim-internals::stream-set-cursor-position)
+
(defparameter cell-inner-width 40)
(defparameter cell-inner-height 40)
(defparameter half-cell-inner-width 20)
(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))
- #-mcclim
(stream-set-cursor-position stream label-width label-height)
- #+mcclim
- (setf (stream-set-cursor-position stream)
- (values label-width label-height))
(surrounding-output-with-border (stream)
(formatting-table (stream :y-spacing 0 :x-spacing 0)
(dotimes (row 8)