X-Git-Url: http://git.kpe.io/?p=reversi.git;a=blobdiff_plain;f=io-clim.lisp;h=12ea49b5f11370bf8004f960a24122de472cdc3f;hp=ee6a0e85a7c1771f3c5b9c97cfb16c3f86622499;hb=d92820d39c18a373611b5bfb018631cffe3e4bcd;hpb=e1241b8e073586a1f92b6fb8556883d45d077627 diff --git a/io-clim.lisp b/io-clim.lisp index ee6a0e8..12ea49b 100644 --- a/io-clim.lisp +++ b/io-clim.lisp @@ -8,16 +8,18 @@ ;;;; 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.13 2003/06/12 12:42:13 kevin Exp $ ;;;; -;;;; This file is Copyright (c) 2001-2002 by Kevin M. Rosenberg +;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg ;;;; ;;;; Reversi users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;;*************************************************************************** -(in-package :reversi) +(in-package #:reversi) + +#+mcclim (shadowing-import 'clim-internals::stream-set-cursor-position) (defparameter cell-inner-width 40) (defparameter cell-inner-height 40) @@ -345,9 +347,13 @@ (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 game)) + (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)))))))))) @@ -671,11 +677,7 @@ (+ 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)