X-Git-Url: http://git.kpe.io/?p=reversi.git;a=blobdiff_plain;f=io.lisp;h=635f90c0c76aa46ca8dc998d00e503183e804974;hp=26872eca12a75a20d0cf33123892d2481c24ee55;hb=d92820d39c18a373611b5bfb018631cffe3e4bcd;hpb=48b1a775e575a66bc154620107a8e27321ea306c diff --git a/io.lisp b/io.lisp index 26872ec..635f90c 100644 --- a/io.lisp +++ b/io.lisp @@ -8,9 +8,9 @@ ;;;; Programer: Kevin Rosenberg based on code by Peter Norvig ;;;; Date Started: 1 Nov 2001 ;;;; -;;;; $Id: io.lisp,v 1.3 2003/05/06 15:51:20 kevin Exp $ +;;;; $Id: io.lisp,v 1.6 2003/06/17 05:47:18 kevin Exp $ ;;;; -;;;; This file is Copyright (c) 2001-2002 by Kevin M. Rosenberg +;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg ;;;; and Copyright (c) 1998-2002 Peter Norvig ;;;; ;;;; Reversi users are granted the rights to distribute and use this software @@ -20,15 +20,13 @@ (in-package #:reversi) -(eval-when (:compile-toplevel) - (declaim (optimize (safety 1) (space 0) (speed 3) (compilation-speed 0)))) - (eval-when (:compile-toplevel :load-toplevel :execute) (let ((square-names (cross-product #'concat-symbol '(? A B C D E F G H ?) '(? 1 2 3 4 5 6 7 8 ?)))) + (declare (type list square-names)) (defun h8->88 (str) "Convert from alphanumeric to numeric square notation." @@ -38,7 +36,7 @@ (defun 88->h8 (num) "Convert from numeric to alphanumeric square notation." (if (valid-p num) - (elt square-names num) + (nth num square-names) num))) (defun moves-to-string (moves)