X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=io-clim.lisp;h=79718dea0be0c376c43f730f759ce7c7ded8da63;hb=039918164c7320373263f8d9d6eca3e68f1593dd;hp=ff5bfd3ad0a53a48e8abb5a0c017ae871c3387e1;hpb=86380fb03aca1a97c5b4b2e49001f783614d504b;p=reversi.git diff --git a/io-clim.lisp b/io-clim.lisp index ff5bfd3..79718de 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.5 2003/03/22 17:19:15 kevin Exp $ +;;;; $Id$ ;;;; -;;;; 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) @@ -247,7 +249,7 @@ 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 @@ -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))))))))))