[comp.sources.games] v11i097: reve - an othello game, Patch2a

billr@saab.CNA.TEK.COM (Bill Randle) (12/20/90)

Submitted-by: Rich Burridge <rburridge@sun.COM>
Posting-number: Volume 11, Issue 97
Archive-name: reve/Patch2a
Patch-To: reve: Volume 11, Issue 52-58
Environment: SunView, XView, X11R4, termcap

	[This was previously posted to comp.sources.games.bugs.
	 It is being reposted here so that it will get archived
	 with the original source. This may be unshared or directly
	 fed to patch(1), if you have the current version.  -br]


/*
 *  Official patch #2 for Reve v1.1.
 *
 *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
 *  All rights reserved.
 *
 *  Permission is granted to copy this patch, for redistribution
 *  in patch form only, provided the news headers in "substantially
 *  unaltered format" are retained, the introductory messages are not
 *  removed, and no monies are exchanged.
 *
 *  Permission is also granted to copy this patch, without the news
 *  headers, for the purposes of patching the Reve source and making
 *  an executable copy by means of compilation, provided that such
 *  copy will not be used for the purposes of competition in any othello
 *  tournaments, without prior permission from the authors.
 */

CONTENTS:

1. What is reve?
2/ Changes made in this patch.
3/ How to install this patch.
4/ How to get previous patches.

----------------

1/ What is reve?

Reve is an othello game. It works under SunView, XView, X11 (Xlib) and on
dumb tty terminals.

Reve has nine levels of difficulty. Levels 1-3 should be useful to beginners,
levels 4-6 would satisfy amateurs, and the higher levels will give experts a
good game. Level 8 (30 minutes) is the tournament level.

----------------

2/ Changes made in this patch.

       * Adjusted Makefile.dist to correctly install and shar reve.man and
         reve.man.text.
 
       * From Soren Hein <shein@ferdowsi.berkeley.edu>
         The message "Computer can't play both sides" or words to that
         effect, almost extends into the "Notes" line--not pretty.
         I've moved the notes panel message down below the display message.
         The score and turn messages are below that. This will allow longer
         display messages and evaluation information.

       * From Soren Hein <shein@ferdowsi.berkeley.edu>
         From Jacob E. Goodman <JEGCC@CUNYVM.CUNY.EDU>
         The "last move" square was not being removed when a new move was
         made, with the monochrome SunView version.

       * From Soren Hein <shein@ferdowsi.berkeley.edu>
         Stick with either "piece" or "stone" when outputting messages. The
         manual pages have been changes to use stone[s].

       * From Soren Hein <shein@ferdowsi.berkeley.edu>
         The mechanism for moving (pulling a circle around) is neat, but
         slightly imprecise. How about making the square which is pointed to
         be surrounded by a black box in addition?

       * From Rod Whitby <rwhitby@adl.austek.oz>
         The redefinition of LIBDIR in the Reve Imakefile will override any
         site customisation in site.def in the Imake config directory.

       * From Daniel Edward Lovinger <dl2n+@andrew.cmu.edu>
         Use <X11/Xos.h> in x11.c and xview.c - it makes system transparent
         code a considerable bit easier ... at least in terms of header file
         stuff. In particular, it handles the {strings,string}.h bit
         automagically.

       * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
         The -animate command line option has been provided to show animation.
         The computer's stone will glide in from the top left corner of the
         board, and if you hold the left mouse button down, you can drag
         your stone around.

       * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
         The -quick command line option have been provided to prevent the
         flash of the turned over stones, and thus provide a quicker game.

       * From Valerie Haecky <vmh@Eng.Sun.COM>
         Showing the last move could be optional. The -last command line
         option has been provided to do this.

       * The -b command line option has been changed to -black.
         The -l command line option has been changed to -load.
         The -n command line option has been changed to -notes.
         The -w command line option has been changed to -white.

       * From Jacob E. Goodman <JEGCC@CUNYVM.CUNY.EDU>
         With the SunView version on a monochrome screen, when I close Reve
         up, the icon is invisible.

      *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
         The "Done" button always confuses me, I would have thought "Hide",
         "Iconify" would have been a better label for it.

      *  Incorporated the game Reve game strategy routines from Yves that
         were used in the University of Waterloo Othello competition. These
         should increase the speed, and the quality of the notation of the
         5 stones border. A bug detected on DecStation 5000 has been solved
         too. The note is different for:

            . . o o o o o .        and        . . o o o o o .
            ? ? o ? ? ? ? ?                   ? ? x ? ? ? ? ?

            Bad, because a real               "Good" ( note = 0 ),
            5 stones border.                  because in fact a future
            ( insertion problem )             6 stones border.

      *  To stop Saber-C from bitching, added continue's to all while and
         for loops that had empty bodies.

      *  A call to draw_rect() in draw_textfield() in items.c had an incorrect
         number of parameters.

      *  From John Eldredge <mtxinu!uunet.UU.NET!radar!eldredge@Sun.COM>
         Added in changes to get Reve to compile on an AT&T UNIX PC (also
         known as a 7300 or 3B1). This machine uses version 3.51 of its
         operating system, which is based upon System V Rev. 2.
         In addition to a few SYSV conditional compilations for the #include
         for <sys/times.h>, a new definition has been added to the
         Makefile.dist file, called NO_TIMEVAL which needs to be uncommented,
         since the timeval structure isn't defined under System V. The usleep()
         fix is a real hack; System V (or at least this version) doesn't have
         either the select() system call or the usleep() system call, and can
         only sleep multiples of one second.

       * The keyboard accelerator for "moves?" has been changed from 'A' to
         'M'.

       * Suggest shows an evaluation if Notes are on.

       * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
         When you undo a move, I suspect the entire board is redrawn. If you
         keep a separate array of what's actually on-screen, then a take-back
         should only redraw the squares that are different.

       * From Soren Hein <shein@ferdowsi.berkeley.edu>
         It shouldn't say "Black to move" or give Notes when game is over.

       * From Soren Hein <shein@ferdowsi.berkeley.edu>
         When the human takes a move back, the line to the right, near the
         bottom, saying something like: White: <c-7> eval : 1488
         should change back accordingly.
 
       * The X11 version was incorrectly processing the Shift keys.

       * From Valerie Haecky <vmh@Eng.Sun.COM>
         Instead of the square used to show "last move", you could display the
         move number in the stone. This is nice, if you want to comment a game.
         I just find myself counting stones all the time. I've added the
         -number command line option to do this.

       * From Soren Hein <shein@ferdowsi.berkeley.edu>
         The note function is not so useful when you don't know what "1488"
         means, anyway. Are positive numbers good for White, or do they just
         represent the incremental value of the latest move? Could they be
         meaningfully converted into an equivalent number of pieces?

         [An explanation of how the evaluation value is calculated, has been
          added to the README file, in the strategy section - Rich.]

       * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
         From Soren Hein <shein@ferdowsi.berkeley.edu>
         As the computer is making it's move, highlight the best square found
         so far during the computer search and display its rating in the Notes
         section.

       * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
         Fixed up the MANIFEST and FILES files, to use the new names from
         patch #1.

----------------

3/ How to install this patch.

This patch consists of three parts. Save each one first. You should then
use Larry Wall's patch program to apply these changes. Assuming the three
files are called patch2-1, patch2-2 and patch2-3, do the following:

cd reve_src        # directory where your reve source files are.
patch <patch1-1
patch <patch1-2
patch <patch1-3

Copy Makefile.dist to Makefile, and adjust for your site. See the README
file for things you might have to tweak in order to get Reve to work on
your machine.

You will then have to do the appropriate make, to generate the graphics
version you require. Do a "make help" to obtain more information on this.

Finally, you should do a "make install". You will probably have to be
super-user to do this.

If you have any problems with Reve after applying this patch, and your
problem is not listed in the TODO file, please let us know.

----------------

4/ How to get previous patches.

If you need to get patches 1, then this can be obtained from the automatic
mail archive server, by sending a message to rb-archive-server@Aus.Sun.COM
containing the line:
 
send reve patch1
 
where n is the patch number you require.
 
You can also include a path line in these requests to indicate the mail
path that the archive server should use to send the files to you. Such a
path line could be:
 
path uunet.uu.net!hostname!user
 
Note that this is uunet.uu.net and not just uunet. Sun.COM doesn't recognise
just uunet.
 
[NOTE: When unpacking the shars generated by the automatic mail service,
       it is possible you will get error messages for incorrect length.
       Please ignore; hopefully the files should still unpack correctly].
 
Rich Burridge           richb@Aus.Sun.COM
Yves Gallot             galloty@cernvax.cern.ch

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 3)."
# Contents:  patches02a
# Wrapped by billr@saab on Wed Dec 19 16:32:16 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches02a' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patches02a'\"
else
echo shar: Extracting \"'patches02a'\" \(43518 characters\)
sed "s/^X//" >'patches02a' <<'END_OF_FILE'
X------- patchlevel.h -------
XPrereq: 1
X*** /tmp/da02130        Wed Nov 28 11:00:28 1990
X--- patchlevel.h        Fri Nov  9 12:42:30 1990
X***************
X*** 22,25 ****
X   *  (see README file), then an attempt will be made to fix them.
X   */
X
X! #define  PATCHLEVEL  1
X--- 22,25 ----
X   *  (see README file), then an attempt will be made to fix them.
X   */
X
X! #define  PATCHLEVEL  2
X
X------- CHANGES -------
X*** /tmp/da02103	Wed Nov 28 11:00:21 1990
X--- CHANGES	Wed Nov 28 10:58:57 1990
X***************
X*** 23,28 ****
X--- 23,167 ----
X  Reve change history.
X  ====================
X  
X+ v1.1 - patchlevel 2. 28th November 1990.
X+ 
X+        * Adjusted Makefile.dist to correctly install and shar reve.man and
X+          reve.man.text.
X+ 
X+        * From Soren Hein <shein@ferdowsi.berkeley.edu>
X+          The message "Computer can't play both sides" or words to that
X+          effect, almost extends into the "Notes" line--not pretty.
X+          I've moved the notes panel message down below the display message.
X+          The score and turn messages are below that. This will allow longer
X+          display messages and evaluation information.
X+ 
X+        * From Soren Hein <shein@ferdowsi.berkeley.edu>
X+          From Jacob E. Goodman <JEGCC@CUNYVM.CUNY.EDU>
X+          The "last move" square was not being removed when a new move was
X+          made, with the monochrome SunView version.
X+ 
X+        * From Soren Hein <shein@ferdowsi.berkeley.edu>
X+          Stick with either "piece" or "stone" when outputting messages. The
X+          manual pages have been changes to use stone[s].
X+ 
X+        * From Soren Hein <shein@ferdowsi.berkeley.edu>
X+          The mechanism for moving (pulling a circle around) is neat, but
X+          slightly imprecise. How about making the square which is pointed to
X+          be surrounded by a black box in addition?
X+ 
X+        * From Rod Whitby <rwhitby@adl.austek.oz>
X+          The redefinition of LIBDIR in the Reve Imakefile will override any
X+          site customisation in site.def in the Imake config directory.
X+ 
X+        * From Daniel Edward Lovinger <dl2n+@andrew.cmu.edu>
X+          Use <X11/Xos.h> in x11.c and xview.c - it makes system transparent
X+          code a considerable bit easier ... at least in terms of header file
X+          stuff. In particular, it handles the {strings,string}.h bit
X+          automagically.
X+ 
X+        * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X+          The -animate command line option has been provided to show animation.
X+          The computer's stone will glide in from the top left corner of the
X+          board, and if you hold the left mouse button down, you can drag
X+          your stone around.
X+ 
X+        * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X+          The -quick command line option have been provided to prevent the
X+          flash of the turned over stones, and thus provide a quicker game.
X+ 
X+        * From Valerie Haecky <vmh@Eng.Sun.COM>
X+          Showing the last move could be optional. The -last command line
X+          option has been provided to do this.
X+ 
X+        * The -b command line option has been changed to -black.
X+          The -l command line option has been changed to -load.
X+          The -n command line option has been changed to -notes.
X+          The -w command line option has been changed to -white.
X+ 
X+        * From Jacob E. Goodman <JEGCC@CUNYVM.CUNY.EDU>
X+          With the SunView version on a monochrome screen, when I close Reve
X+          up, the icon is invisible.
X+ 
X+       *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X+          The "Done" button always confuses me, I would have thought "Hide",
X+          "Iconify" would have been a better label for it.
X+ 
X+       *  Incorporated the game Reve game strategy routines from Yves that
X+          were used in the University of Waterloo Othello competition. These
X+          should increase the speed, and the quality of the notation of the
X+          5 stones border. A bug detected on DecStation 5000 has been solved
X+          too. The note is different for:
X+ 
X+             . . o o o o o .        and        . . o o o o o .
X+             ? ? o ? ? ? ? ?                   ? ? x ? ? ? ? ?
X+ 
X+             Bad, because a real               "Good" ( note = 0 ),
X+             5 stones border.                  because in fact a future
X+             ( insertion problem )             6 stones border.
X+ 
X+       *  To stop Saber-C from bitching, added continue's to all while and
X+          for loops that had empty bodies.
X+ 
X+       *  A call to draw_rect() in draw_textfield() in items.c had an incorrect
X+          number of parameters.
X+ 
X+       *  From John Eldredge <mtxinu!uunet.UU.NET!radar!eldredge@Sun.COM>
X+          Added in changes to get Reve to compile on an AT&T UNIX PC (also
X+          known as a 7300 or 3B1). This machine uses version 3.51 of its
X+          operating system, which is based upon System V Rev. 2.
X+          In addition to a few SYSV conditional compilations for the #include
X+          for <sys/times.h>, a new definition has been added to the
X+          Makefile.dist file, called NO_TIMEVAL which needs to be uncommented,
X+          since the timeval structure isn't defined under System V. The usleep()
X+          fix is a real hack; System V (or at least this version) doesn't have
X+          either the select() system call or the usleep() system call, and can
X+          only sleep multiples of one second.
X+ 
X+        * The keyboard accelerator for "moves?" has been changed from 'A' to
X+          'M'.
X+ 
X+        * Suggest shows an evaluation if Notes are on.
X+ 
X+        * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X+          When you undo a move, I suspect the entire board is redrawn. If you
X+          keep a separate array of what's actually on-screen, then a take-back
X+          should only redraw the squares that are different.
X+ 
X+        * From Soren Hein <shein@ferdowsi.berkeley.edu>
X+          It shouldn't say "Black to move" or give Notes when game is over.
X+ 
X+        * From Soren Hein <shein@ferdowsi.berkeley.edu>
X+          When the human takes a move back, the line to the right, near the
X+          bottom, saying something like: White: <c-7> eval : 1488
X+          should change back accordingly.
X+ 
X+        * The X11 version was incorrectly processing the Shift keys.
X+ 
X+        * From Valerie Haecky <vmh@Eng.Sun.COM>
X+          Instead of the square used to show "last move", you could display the
X+          move number in the stone. This is nice, if you want to comment a game.
X+          I just find myself counting stones all the time. I've added the
X+          -number command line option to do this.
X+ 
X+        * From Soren Hein <shein@ferdowsi.berkeley.edu>
X+          The note function is not so useful when you don't know what "1488"
X+          means, anyway. Are positive numbers good for White, or do they just
X+          represent the incremental value of the latest move? Could they be
X+          meaningfully converted into an equivalent number of pieces?
X+ 
X+          [An explanation of how the evaluation value is calculated, has been
X+           added to the README file, in the strategy section - Rich.]
X+ 
X+        * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X+          From Soren Hein <shein@ferdowsi.berkeley.edu>
X+          As the computer is making it's move, highlight the best square found
X+          so far during the computer search and display its rating in the Notes
X+          section.
X+ 
X+        * From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X+          Fixed up the MANIFEST and FILES files, to use the new names from
X+          patch #1.
X+ 
X  v1.1 - patchlevel 1. 9th November 1990.
X  
X         * Time allocation function was out by 1. All the levels are shifted
X
X------- Makefile.dist -------
X*** /tmp/da02106	Wed Nov 28 11:00:22 1990
X--- Makefile.dist	Tue Nov 20 11:19:44 1990
X***************
X*** 51,56 ****
X--- 51,62 ----
X  #
X  #NO_USLEEP      = -DNO_USLEEP
X  #-----------------------------------------------------------------------
X+ #  If your machine doesn't have a definition for the timeval struct, then
X+ #  you will need to uncomment this definition. It's needed to get Reve to
X+ #  work an an AT&T UNIX PC (aka 7300 or 3b1).
X+ #
X+ #NO_TIMEVAL     = -DNO_TIMEVAL
X+ #------------------------------------------------------------------------
X  #  If you not running under a BSD4.3 derived system, the parameters
X  #  to the select call are different, and this definition should be
X  #  uncommented. You need to uncomment this for SunOS v3.x.
X***************
X*** 94,101 ****
X  #
X  #  Compilation flags and standard macro definitions.
X  #
X! CDEFS		= $(NOINDEX) $(NOSELECT) $(NO_USLEEP) $(EDGENAME) $(SELTYPE) \
X! 		  $(SIGRET) $(SYSV) $(X11INCDIR) $(XVIEWINCDIR)
X  CFLAGS          = -O $(CDEFS)
X  #
X  #==========================================================================
X--- 100,108 ----
X  #
X  #  Compilation flags and standard macro definitions.
X  #
X! CDEFS		= $(NOINDEX) $(NOSELECT) $(NO_USLEEP) $(NO_TIMEVAL) \
X! 		  $(EDGENAME) $(SELTYPE) $(SIGRET) $(SYSV) \
X! 		  $(X11INCDIR) $(XVIEWINCDIR)
X  CFLAGS          = -O $(CDEFS)
X  #
X  #==========================================================================
X***************
X*** 129,136 ****
X  		  $(IDIR)/hglass.cursor \
X  		  $(IDIR)/nocur.cursor
X  
X! OTHERS          = CHANGES README TODO reve.6 MANIFEST FILES \
X! 		  reve.man Makefile.dist
X  
X  SFILES1         = events.c items.c makemove.c main.c procs.c
X  SFILES2		= boardstuff.c rev_eval.c rev_ip.c rev_iycp.c $(HDRS)
X--- 136,143 ----
X  		  $(IDIR)/hglass.cursor \
X  		  $(IDIR)/nocur.cursor
X  
X! OTHERS          = CHANGES README TODO reve.man MANIFEST FILES \
X! 		  reve.man.text Makefile.dist
X  
X  SFILES1         = events.c items.c makemove.c main.c procs.c
X  SFILES2		= boardstuff.c rev_eval.c rev_ip.c rev_iycp.c $(HDRS)
X***************
X*** 190,196 ****
X  		-cat reve.edge1 reve.edge2 > $(ETABLE)
X  		-cp $(ETABLE) $(LIBDIR)
X  		-chmod 644 $(LIBDIR)/$(ETABLE)
X! 		-cp reve.6 $(MANDIR)/reve.$(MANSECT)
X  		-chmod 644 $(MANDIR)/reve.$(MANSECT)
X  
X  clean:;         rm -f *.o *.Z *.uu Part* *~ reve $(BINARIES) core
X--- 197,203 ----
X  		-cat reve.edge1 reve.edge2 > $(ETABLE)
X  		-cp $(ETABLE) $(LIBDIR)
X  		-chmod 644 $(LIBDIR)/$(ETABLE)
X! 		-cp reve.man $(MANDIR)/reve.$(MANSECT)
X  		-chmod 644 $(MANDIR)/reve.$(MANSECT)
X  
X  clean:;         rm -f *.o *.Z *.uu Part* *~ reve $(BINARIES) core
X
X------- README -------
X*** /tmp/da02109	Wed Nov 28 11:00:22 1990
X--- README	Fri Nov 23 08:07:26 1990
X***************
X*** 103,108 ****
X--- 103,131 ----
X               "The Development of a World Class Othello Program", Kai-Fu Lee
X               and Sanjoy Mahajan, Art. Int. 43(1990) 21-36.
X  
X+ Turning Notes on, displays an evaluation for each computer move. This value
X+ is calculated as follows:
X+ 
X+   An edgetable is pre-computed. A value is given to each border configuration.
X+   The average is 0, the mean value about 1000.
X+ 
X+   Then I fix c1 = 312 + 6 * movenumber
X+              c2 = | 50 + 2 * movenumber   1 <= movenumber <= 25
X+                   | 75 + movenumber      25 <= movenumber <= 60
X+              c3 = 99
X+   ( Iago implementation constants )
X+ 
X+   then eval = ( c1 * ( edgesnote + Xsquaresnote ) +
X+                 c2 * currentmobility +
X+                 c3 * Potentialmobility ) / 1000
X+ 
X+   mobility = 1000 * ( p - o ) / ( p + o + 2 )
X+   where p is the evaluation for the player and o for the opponent
X+ 
X+   p and o are about in the set [ -10, 10 ]
X+ 
X+ In short, a positive number is good for the computer, and a negative numvber
X+ is good for the opponent.
X  
X  Here is a listing of a high level Reve vs Reve match.
X  
X
X------- TODO -------
X*** /tmp/da02112	Wed Nov 28 11:00:23 1990
X--- TODO	Wed Nov 28 10:59:04 1990
X***************
X*** 20,29 ****
X   *  (see README file), then an attempt will be made to fix them.
X   */
X  
X  Reve TODO list.
X  ===============
X  
X! 1/ Finish off the X11 "two screens on two machines" version. The hooks are
X     all in place, but not enough spare time...
X     ~ The cursors in x11.c will need to be allocated for each screen
X       separately.
X--- 20,43 ----
X   *  (see README file), then an attempt will be made to fix them.
X   */
X  
X+ Problems with Reve on various hardware.
X+ =======================================
X+ 
X+ *  From Nick Sayer <mrapple@quack.sac.ca.us>
X+    System is a Sun 2/170 running SunOS 4.0, using the TTY version on a
X+    TVI-925. Reve makes a mess on so called "magic-cookie" terminals.
X+ 
X+ *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X+    When compiling rev_ip.c on an HP-UX 9000 Series 300 machine (68020 or
X+    68030), the HP-UX 7.0 C compiler crashes out with the following error:
X+   
X+    C1 internal error in "tuplonges": invalid OREG in recognize_array()
X+   
X+ 
X  Reve TODO list.
X  ===============
X  
X! *  Finish off the X11 "two screens on two machines" version. The hooks are
X     all in place, but not enough spare time...
X     ~ The cursors in x11.c will need to be allocated for each screen
X       separately.
X***************
X*** 36,52 ****
X       screens. There are probably other routines where this should be the case.
X     ~ There will be a few other places where certain routines will need to
X       output to both displays if dtype is XTWO.
X! 
X! 2/ Allow the computer to play itself. Currently this option is disabled,
X     because of the inability with some of the graphics versions to interrupt
X     it, once it's started.
X  
X! 3/ From Valerie Haecky <vmh@Eng.Sun.COM>
X     It might be nice to have an additional button for <help>.
X!    It pops up an alert, giving a short summary of the rules
X!    and explaining non-obvious things, like how Difficulty is measured.
X  
X! 4/ There are several problems outstanding with the XView version:
X     ~ **IMPORTANT** Need to find some way to disable MS_LEFT whilst the
X                     computer is having its move. At the moment, if you press
X                     the left mouse button while the computer is doing something,
X--- 50,66 ----
X       screens. There are probably other routines where this should be the case.
X     ~ There will be a few other places where certain routines will need to
X       output to both displays if dtype is XTWO.
X!  
X! *  Allow the computer to play itself. Currently this option is disabled,
X     because of the inability with some of the graphics versions to interrupt
X     it, once it's started.
X  
X! *  From Valerie Haecky <vmh@Eng.Sun.COM>
X     It might be nice to have an additional button for <help>.
X!    It pops up an alert, giving a short summary of the rules and explaining
X!    non-obvious things, like how Difficulty is measured.
X  
X! *  There are several problems outstanding with the XView version:
X     ~ **IMPORTANT** Need to find some way to disable MS_LEFT whilst the
X                     computer is having its move. At the moment, if you press
X                     the left mouse button while the computer is doing something,
X***************
X*** 67,143 ****
X       currently has; whose turn it is to move could be placed in the title
X       line, and panel messages such as invalid move could be written to the
X       footer.
X  
X! 5/ There appears to be a bug with the X11 implementation on an IBM RS6000.
X!    When the computer moves a piece from the upper-left border to its place,
X!    a "trace" appears along its path. The color of this trace is the color of
X!    the background of the screen.
X! 
X! 6/ Need to allow options like -scale through on the command line. This can
X     be done by have an init_graphics() routine that gets called right at
X     the start, which strips off graphics specific options.
X  
X! 7/ Need to add in the ability to show the last move, and show all moves to
X     the tty version.
X  
X! 8/ From Valerie Haecky <vmh@Eng.Sun.COM>
X     Display the time left for the user[s] and computer.
X  
X! 9/ From Valerie Haecky <vmh@Eng.Sun.COM>
X!    Showing the last move could be optional.
X  
X! 10/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     ~ Provide an option or button to toggle the animation of the computer
X!       piece from the top-left corner onto the board. On slow workstations,
X!       this is embarrassingly flickery and quite distracting.
X  
X!     ~ Ditto for the flash of the turned over pieces - it slows down the game
X!       when you just want a quick game.
X! 
X!     ~ Add the ability to change the default background colour of the board to
X!       a (not too bright !) green colour. After all, that's the colour of the
X!       othello sets you buy in the shops!
X   
X!     [I'll do these with settable resources. I'll allow you to set some of
X!      them on the command line, and I'll add a .reverc file, which will be read
X!      from the users home directory. For the X11/XView versions, I'll allow the
X!      resources to be set in all the standard X places, and the .reverc file can
X!      superceed them - Rich.]
X  
X! 11/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     Supply a way of forcing the computer to move before its search is complete.
X!     This would be very handy at the higher levels.
X  
X! 12/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     Allow the player to go forwards through a game as well as backwards (Undo
X!     only performs the latter and not the former). In other words, "undo the
X!     Undo" !
X  
X! 13/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     As the computer is making it's move, highlight the best square found so
X!     far during the computer search and display its rating in the Notes section.
X  
X! 14/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     What about a 'Play Next Best' option? This would undo the last computer
X!     move and play the second best move found rather than the best one. If
X!     selected again, there would be another undo and the third best move would
X!     be made instead and so on, until the move list is exhausted. It's great
X!     for trying out different moves in the same position.
X  
X! 15/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     Countdown clocks for blitz games (first to hit 00:00:00 loses if the game
X!     is still in progress).
X  
X! 16/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     Board editing.
X  
X! 17/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     A display of the full tree for the best move rather than just the best
X!     move itself.
X  
X! 18/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     A resign feature if the search shows a completely lost endgame.
X  
X! 19/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!     A 'I will win/lose in x moves' announcement if a forced win/loss is
X!     detected.
X--- 81,298 ----
X       currently has; whose turn it is to move could be placed in the title
X       line, and panel messages such as invalid move could be written to the
X       footer.
X+    ~ It should be possible to start a load/save by just typing Return in the
X+      Load/Save popup.
X  
X! *  Need to allow options like -scale through on the command line. This can
X     be done by have an init_graphics() routine that gets called right at
X     the start, which strips off graphics specific options.
X  
X! *  Need to add in the ability to show the last move, and show all moves to
X     the tty version.
X  
X! *  From Valerie Haecky <vmh@Eng.Sun.COM>
X     Display the time left for the user[s] and computer.
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Add the ability to change the default background colour of the board to
X!    a (not too bright !) green colour. After all, that's the colour of the
X!    othello sets you buy in the shops!
X!  
X!    [I'll do these with settable resources. I'll allow you to set some of
X!     them on the command line, and I'll add a .reverc file, which will be read
X!     from the users home directory. For the X11/XView versions, I'll allow the
X!     resources to be set in all the standard X places, and the .reverc file can
X!     superceed them - Rich.]
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Supply a way of forcing the computer to move before its search is complete.
X!    This would be very handy at the higher levels.
X  
X!    If we can actually see what moves have been though about so far, then you
X!    may no longer be left in the dark as to what the computer is doing (you can
X!    manually stop it thinking when it finds a really strong move for example).
X!    As an afterthought, I realised that it would be nice to know what ply
X!    level the search is currently up to.
X   
X!    An even neater trick would be to number each square with its position in
X!    the best move list. You could either show this at the end of each ply or
X!    update in real-time (in which case, the numbered squares would need to be
X!    cleared when the ply search is deepened to avoid confusion - also some
X!    on-screen renumbering would have to be done on-the-fly).
X!  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Allow the player to go forwards through a game as well as backwards (Undo
X!    only performs the latter and not the former). In other words, "undo the
X!    Undo" !
X  
X!    "New Game" should just undo the game right back to the start. That way
X!    a player can use the move forwards facility to replay the game easily
X!    right from the start. Of course, as soon as the player makes a new move,
X!    then s/he won't be able to replay the game any further.
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Countdown clocks for blitz games (first to hit 00:00:00 loses if the game
X!    is still in progress).
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    From Valerie Haecky <vmh@Eng.Sun.COM>
X!    Board editing. A 'setup' mode, where you can place stones on the board
X!    (NOT moves). This is good for game analysis, puzzles, starting from a
X!    specific opening (like Reve always plays perpendicular, and no-one knows
X!    whether this is best, and it would be nice to set up other openings).
X!    It has to be stones, not moves, because puzzles don't always contain legal
X!    positions, and transcripts have bugs.
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    A 'I will win/lose in x moves' announcement if a forced win/loss is
X!    detected.
X  
X! *  From Valerie Haecky <vmh@Eng.Sun.COM>
X!    With the XView version, when you change the Black/White setting in the
X!    buttons, the default in the menu should change, too.
X!    Or: if the default in the menu stays the same, if you } hit the new menu
X!    button, and ask for the default, the buttons should update to reflect this.
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    When you click on Quit and have actually made some moves/changes, then
X!    it would be nice to have a dialogue box pop up to say "Save game before
X!    Quitting ?" with Yes, No and Cancel buttons in the box. Perhaps this could
X!    be part of a .reverc/.Xresources setting, because some people might not
X!    like the intrusion. This should probably apply to the "New Game" button
X!    too come to think of it ("Save game before Restarting ?" in this case).
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Display the number of board positions searched so far. The frequency of
X!    update is up to taste really - perhaps when the best move found is
X!    updated. Tied in with this, you could give a "positions searched per
X!    second" rating when the computer finishes its search and makes its move.
X!    This would be a great measure of the speed of the machine/algorithm.
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Allow the level to be explicitly set in seconds per move (or perhaps
X!    minutes per game as it currently is) rather than having a fixed set of
X!    levels. The highest playing level could be called "Infinite" rather than
X!    "Tournament" and just plays until interrupted or the game end is detected.
X  
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Implement an "Equality" play mode which matches the computer playing time
X!    exactly with the human's.
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Have a 3-D board option. It'd sure look great. You just need to angle the
X!    edges inward from bottom to top and draw elipses rather than circles.
X!    Taking this further, you come show a wood grained board, and a light
X!    source up above for ray shaded stones.
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    If you intend to implement on-screen clocks (hopefully in HH:MM:SS
X!    format), then have options to reset them to zero at any time and also
X!    to stop them (effectively a "Pause" mode) - perhaps that could be tied
X!    in with iconification. Perhaps another option (or resource to decide
X!    whether the clocks should be analog or digital).
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Show the four "blobs" at the edges of the four central squares (top-left
X!    of d4, top-right of d5, bottom-left of e4 and bottom-right of e5). No,
X!    I don't know why they're there on commercial Othello boards in the first
X!    place, except perhaps to mark the starting positions.
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Have some annoyingly intrusive comments during the game :-) Examples
X!    could be: "That was a really bad move", "I'm crushing you", "This
X!    position is boring", "Hurry up and make your move !" etc. etc.
X! 
X!    [Othello2, the predecesor of the graphics used in Reve, and posted to
X!     comp.sources.games last year, used to have this ability - Rich.]
X! 
X! *  From Robert Cohen <robert@anucsd.anu.oz.au>
X!    If you play black and as your first move you go either e6 or f5 and then
X!    ask for a suggestion, the suggestion is a1 which is of course an illegal
X!    move. This appears to be independent of level chosen.
X! 
X! *  Try to get online copies of the two paper referenced in the README file.
X!    Otherwise, add more comments to the computer strategy code.
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Allow the board to be rotated 90 degrees. The movelist will also have
X!    to be adjusted of course.
X! 
X! *  Add in the ability for the Reve window[s] to be totally resized. This
X!    would involve the black and white stone offscreen images being
X!    generated "on-the-fly". Two things to note:
X! 
X!    a) The resize must be forced to be square in dimensions. This avoids very
X!       strange-looking elliptical pieces.
X! 
X!    b) The dimensions should be a multiple of 8, otherwise there will be some
X!       funny sub-dimensions for border, square and piece sizes.
X! 
X! *  From Soren Hein <shein@ferdowsi.berkeley.edu>
X!    Reve currently can't refresh the screen when the computer is making a
X!    move.
X! 
X! *  From Soren Hein <shein@ferdowsi.berkeley.edu>
X!    Why double switches for White, Black and Notes? Both halves of the
X!    switches do the same thing.
X! 
X! *  From Soren Hein <shein@ferdowsi.berkeley.edu>
X!    Possible to give some strength indication of the levels? Maybe by
X!    analogy with chess ratings, if you're familiar enough with Elo-ratings
X!    to make guesses/comparisons.
X! 
X! *  From Soren Hein <shein@ferdowsi.berkeley.edu>
X!    There should be symmetry between the case when the human can't move
X!    and when there is only one move for them. Yet in one case the program just
X!    goes on, and in the other, it waits for the only move. I would like to
X!    give my OK to forfeit before the program takes its next move.
X! 
X! *  From Dan Bernstein <brnstnd@KRAMDEN.ACF.NYU.EDU>
X!    An idea which can possibly be incorporated:
X! 
X!    Along with each board keep two arrays size 100 (it's easier on the code
X!    to use artifical borders) of bytes. Each byte has a bit set if a player
X!    can take from that spot in the direction numbered by the bit. This turns
X!    out to be reasonably easy to maintain with the moves, and it makes legal
X!    move checks and actual flips so fast that the program runs about three
X!    times faster overall.
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    It would be nice to have the ability to "make tty" in the Imakefile as
X!    well as being able to generate the X11 version.
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    Add in a move list window, which would contain a scrollable list of all
X!    the moves so far (plus evaluation for the computers moves).
X! 
X! 
X! Items we're unlikely to implement.
X! ==================================
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    From Soren Hein <shein@ferdowsi.berkeley.edu>
X!    What about a 'Play Next Best' option? This would undo the last computer
X!    move and play the second best move found rather than the best one. If
X!    selected again, there would be another undo and the third best move would
X!    be made instead and so on, until the move list is exhausted. It's great
X!    for trying out different moves in the same position.
X!  
X!    [There is currently no ordering move list, because a search can be stopped
X!     by the alarm. Then the move list is only 1 or 2 moves length - Yves.]
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    A display of the full tree for the best move rather than just the best
X!    move itself.
X! 
X!    [In my algorithm, it is impossible to have it. How do want to know, when
X!     you are in the tree, that it will be the best move ? And when you know it,
X!     it is impossible to know where you were in the tree - Yves.]
X! 
X! *  From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
X!    A resign feature if the search shows a completely lost endgame.
X! 
X!    [Othello is not chess. The result is the disks differential, not win,
X!     tie or loss. And I don't know if it is a "completely lost endgame". I
X!     only know that if the opponent is perfect, then I will lose. A human
X!     player that should win at move 46 and doesn't use undo, can very easily
X!     lose - Yves.]
X
X------- boardstuff.c -------
X*** /tmp/da02115	Wed Nov 28 11:00:24 1990
X--- boardstuff.c	Wed Nov 28 10:35:13 1990
X***************
X*** 27,33 ****
X--- 27,37 ----
X  #include "color.h"
X  #include "extern.h"
X  #include <ctype.h>
X+ #ifdef SYSV
X+ #include <sys/times.h>
X+ #else
X  #include <sys/time.h>
X+ #endif /*SYSV*/
X  
X  #ifdef X11
X  #include <X11/Xos.h>
X***************
X*** 179,190 ****
X    taken = formfliplist(move, player) ;
X    update_board_image(player) ;
X    SPRINTF(line, "%s took %d %s", (player == BLACK) ? "Black" : "White",
X!                           taken, (taken  == 1)     ? "piece" : "pieces") ;
X    message(PANEL_MES, line) ;
X  }
X  
X  
X  void
X  draw_piece(piece, x, y, op)    /* Draw an othello piece on the board. */
X  int piece, x, y ;
X  enum optype op ;
X--- 183,204 ----
X    taken = formfliplist(move, player) ;
X    update_board_image(player) ;
X    SPRINTF(line, "%s took %d %s", (player == BLACK) ? "Black" : "White",
X!                           taken, (taken  == 1)     ? "stone" : "stones") ;
X    message(PANEL_MES, line) ;
X  }
X  
X  
X  void
X+ draw_outline(move, state)
X+ int move ;
X+ enum bltype state ;
X+ {
X+   if (last_outline == -1) return ;
X+   draw_square(move, state, 1) ;
X+ }
X+ 
X+ 
X+ void
X  draw_piece(piece, x, y, op)    /* Draw an othello piece on the board. */
X  int piece, x, y ;
X  enum optype op ;
X***************
X*** 202,208 ****
X   
X  void
X  draw_rect(x1, y1, x2, y2, op, color)
X! int x1, y1, x2, y2, op, color ;
X  {
X    draw_line(x1, y1, x2, y1, op, color) ;
X    draw_line(x1, y1, x1, y2, op, color) ;
X--- 216,223 ----
X   
X  void
X  draw_rect(x1, y1, x2, y2, op, color)
X! int x1, y1, x2, y2, color ;
X! enum optype op ;
X  {
X    draw_line(x1, y1, x2, y1, op, color) ;
X    draw_line(x1, y1, x1, y2, op, color) ;
X***************
X*** 211,216 ****
X--- 226,248 ----
X  }
X  
X  
X+ void
X+ draw_square(move, state, offset)
X+ int move, offset ;
X+ enum bltype state ;
X+ {
X+   int color, x, y ;
X+ 
X+   if (iscolor[(int) cur_dpyno]) color = (state == IS_ON) ? C_BLACK : C_LBROWN ;
X+   else                          color = (state == IS_ON) ? C_BLACK : C_WHITE ;
X+ 
X+   x = (move & 7)  * CELL_SIZE + BBORDER ;
X+   y = (move >> 3) * CELL_SIZE + BBORDER ;
X+   draw_rect(x + offset,             CY + y + offset,
X+             x + CELL_SIZE - offset, CY + y + CELL_SIZE - offset, RSRC, color) ;
X+ }
X+ 
X+ 
X  formfliplist(move, player)
X  int move, player ;
X  {        
X***************
X*** 429,434 ****
X--- 461,478 ----
X  
X  
X  void
X+ set_eval(player, move, note)
X+ int player, move ;
X+ long note ;
X+ {
X+   SPRINTF(line, "%s: <%c-%c> eval : %ld",
X+           (player == BLACK) ? "Black" : "White",
X+           (move & 7) + 'a', (move >> 3) + '1', note) ;
X+   message(EVAL_MES, line) ;
X+ }
X+ 
X+ 
X+ void
X  set_score()
X  {
X    SPRINTF(line, "Stones: Black: %2d  White: %2d",
X***************
X*** 505,524 ****
X  
X  
X  void
X  show_last(move, state)
X  int move ;
X  enum bltype state ;
X  {
X!   int color, x, y ;
X  
X-   if (move == -1) return ;
X-   if (iscolor[(int) cur_dpyno]) color = (state == IS_ON) ? C_BLACK : C_LBROWN ;
X-   else                          color = (state == IS_ON) ? C_BLACK : C_WHITE ;
X  
X!   x = (move & 7)  * CELL_SIZE + BBORDER ;
X!   y = (move >> 3) * CELL_SIZE + BBORDER ;
X!   draw_rect(x + 2,             CY + y + 2,
X!             x + CELL_SIZE - 2, CY + y + CELL_SIZE - 2, RSRC, color) ;
X  }
X  
X  
X--- 549,603 ----
X  
X  
X  void
X+ show_best(move, note)
X+ int move ;
X+ long note ;
X+ {
X+   batch(IS_ON) ;
X+   if (move == -1 || do_bestmove == FALSE) return ;
X+   if (best_cmove != -1)
X+     draw_square(best_cmove, IS_OFF, 2) ;
X+   best_cmove = move ;
X+   draw_square(best_cmove, IS_ON, 2) ;
X+   if (show_notes) set_eval(next_player, move, note) ;
X+   batch(IS_OFF) ;
X+ }
X+ 
X+ 
X+ void
X  show_last(move, state)
X  int move ;
X  enum bltype state ;
X  {
X!   if (move == -1 || do_last == FALSE) return ;
X!   draw_square(move, state, 2) ;
X! }
X  
X  
X! void
X! show_number(move, state)
X! int move ;
X! enum bltype state ;
X! {
X!   char num[3] ;
X!   int color, strw, val, x, y ;
X! 
X!   if (move == -1 || do_number == FALSE) return ;
X!   if (board.square[move] == BLACK)
X!     color = (state == IS_ON) ? C_WHITE : C_BLACK ;
X!   else if (board.square[move] == WHITE)
X!     color = (state == IS_ON) ? C_BLACK : C_WHITE ;
X!   x = (move & 7)  * CELL_SIZE + BBORDER + PIECE_MARGIN ;
X!   y = (move >> 3) * CELL_SIZE + BBORDER + PIECE_MARGIN ;
X! 
X!   val = 60 - board.moves_left ;
X!   if (state == IS_OFF) val-- ;
X!   SPRINTF(num, "%2d", val) ;
X!   strw = get_strwidth(NFONT, num) ;
X! 
X!   x = x + ((2 * PIECE_RAD) - strw) / 2 ;
X!   y = y + CY + nfont_height + ((2 * PIECE_RAD) - nfont_height) / 2 ;
X!   draw_text(x, y, NFONT, color, num) ;
X  }
X  
X  
X***************
X*** 545,556 ****
X  update_board_image(player)
X  int player ;
X  {
X!   int flips, i, piece, x, y ;
X   
X    show_all(IS_OFF) ;
X    show_last(last_move, IS_OFF) ;
X    show_suggestion() ;
X!   for (flips = 0; flips < 4; flips++)
X      {
X        batch(IS_ON) ;
X        FOR_BOARD(i)
X--- 624,637 ----
X  update_board_image(player)
X  int player ;
X  {
X!   int flips, i, piece, total_flips, x, y ;
X   
X+   total_flips = (quickgame == TRUE) ? 2 : 4 ;
X    show_all(IS_OFF) ;
X    show_last(last_move, IS_OFF) ;
X+   show_number(last_move, IS_OFF) ;
X    show_suggestion() ;
X!   for (flips = 0; flips < total_flips; flips++)
X      {
X        batch(IS_ON) ;
X        FOR_BOARD(i)
X***************
X*** 568,573 ****
X--- 649,655 ----
X        PAUSE ;
X      }
X    show_last(move, IS_ON) ;
X+   show_number(move, IS_ON) ;
X    last_move = move ;
X    set_score() ;
X    set_turn(OPPONENT(player)) ;
X***************
X*** 575,586 ****
X    if (show_notes)
X      if ((player == BLACK && items[(int) BLACK_PLAYS].value == COMPUTER) ||
X          (player == WHITE && items[(int) WHITE_PLAYS].value == COMPUTER))
X!       {
X!         SPRINTF(line, "%s: <%c-%c> eval : %ld",
X!                 (player == BLACK) ? "Black" : "White",
X!                 (move & 7) + 'a', (move >> 3) + '1', note) ;
X!         message(EVAL_MES, line) ;
X!       }
X  }
X  
X  
X--- 657,663 ----
X    if (show_notes)
X      if ((player == BLACK && items[(int) BLACK_PLAYS].value == COMPUTER) ||
X          (player == WHITE && items[(int) WHITE_PLAYS].value == COMPUTER))
X!       set_eval(player, move, note) ;
X  }
X  
X  
X***************
X*** 606,609 ****
X--- 683,688 ----
X        SPRINTF(line, "Black wins %d-%d", cs, ps) ;
X        message(SCORE_MES, line) ;
X      }
X+   message(TURN_MES, "") ;
X+   message(EVAL_MES, "") ;
X  }
X
X------- events.c -------
X*** /tmp/da02118	Wed Nov 28 11:00:25 1990
X--- events.c	Thu Nov 22 11:16:40 1990
X***************
X*** 127,143 ****
X  void
X  do_action()
X  {
X    switch (nextc)
X      {
X!       case MOUSE_MOVING : draw_piece(next_player, piece_x, piece_y, RINV) ;
X                            piece_x = curx - PIECE_RAD ;
X                            piece_y = cury - PIECE_RAD ;
X!                           draw_piece(next_player, piece_x, piece_y, RINV) ;
X                            break ;
X                            
X        case ENTER_WINDOW : 
X        case EXIT_WINDOW  : set_cursor(CANVASCUR) ;
X!                           draw_piece(next_player, piece_x, piece_y, RINV) ;
X                            cmode = (enum cantype) ((int) cmode - 1) ;
X                            break ;
X                            
X--- 127,164 ----
X  void
X  do_action()
X  {
X+   int cx, cy, thismove ;
X+ 
X    switch (nextc)
X      {
X!       case MOUSE_MOVING : if (animation == TRUE)
X!                             draw_piece(next_player, piece_x, piece_y, RINV) ;
X                            piece_x = curx - PIECE_RAD ;
X                            piece_y = cury - PIECE_RAD ;
X! 
X!                           cx = (piece_x + PIECE_RAD    - BBORDER) / CELL_SIZE ;
X!                           cy = (piece_y + PIECE_RAD-CY - BBORDER) / CELL_SIZE ;
X! 
X!                           if (cx >= 0 && cy >= 0 && cx < 8 && cy < 8)
X!                             {
X!                               thismove = cy * BOARD_SIZE + cx ;
X! 
X!                               if (thismove != last_outline)
X!                                 draw_outline(last_outline, IS_OFF) ;
X!                               last_outline = thismove ;
X!                               draw_outline(last_outline, IS_ON) ;
X!                             }
X! 
X!                           if (animation == TRUE)
X!                             draw_piece(next_player, piece_x, piece_y, RINV) ;
X                            break ;
X                            
X        case ENTER_WINDOW : 
X        case EXIT_WINDOW  : set_cursor(CANVASCUR) ;
X!                           draw_outline(last_outline, IS_OFF) ;
X!                           last_outline = -1 ;
X!                           if (animation == TRUE)
X!                             draw_piece(next_player, piece_x, piece_y, RINV) ;
X                            cmode = (enum cantype) ((int) cmode - 1) ;
X                            break ;
X                            
X***************
X*** 253,259 ****
X                                set_cursor(NOCURSOR) ;
X                                piece_x = curx - PIECE_RAD ;
X                                piece_y = cury - PIECE_RAD ;
X!                               draw_piece(next_player, piece_x, piece_y, RINV) ;
X                                cmode = (enum cantype) ((int) cmode + 1) ;
X                              }
X                            break ;
X--- 274,282 ----
X                                set_cursor(NOCURSOR) ;
X                                piece_x = curx - PIECE_RAD ;
X                                piece_y = cury - PIECE_RAD ;
X!                               if (animation == TRUE)
X!                                 draw_piece(next_player,
X!                                            piece_x, piece_y, RINV) ;
X                                cmode = (enum cantype) ((int) cmode + 1) ;
X                              }
X                            break ;
X***************
X*** 323,329 ****
X        case 'W' : do_cycle_key(WHITE_PLAYS, nextc) ;
X                   break ;
X  
X!       case 'A' : show_all_moves() ;                    /* Button items. */
X                   break ;
X        case 'L' : curx = 0 ;
X                   draw_textfield() ;
X--- 346,352 ----
X        case 'W' : do_cycle_key(WHITE_PLAYS, nextc) ;
X                   break ;
X  
X!       case 'M' : show_all_moves() ;                    /* Button items. */
X                   break ;
X        case 'L' : curx = 0 ;
X                   draw_textfield() ;
X
X------- extern.h -------
X*** /tmp/da02121	Wed Nov 28 11:00:26 1990
X--- extern.h	Fri Nov 23 08:27:39 1990
X***************
X*** 22,27 ****
X--- 22,29 ----
X   *  (see README file), then an attempt will be made to fix them.
X   */
X  
X+ extern int animation ;     /* If set, show computer glide and piece drag. */
X+ extern int best_cmove ;    /* Best computer move so far. */
X  extern int bfont_height ;  /* Height in pixels for bold font. */
X  extern int but_inverted ;  /* Value of panel item inverted. */
X  extern int color ;         /* Current color value. */
X***************
X*** 28,33 ****
X--- 30,38 ----
X  extern int cur_ch ;        /* Current character pressed. */
X  extern int curx ;          /* Current mouse X position. */
X  extern int cury ;          /* Current mouse Y position. */
X+ extern int do_bestmove ;   /* If set, continuously update best move. */
X+ extern int do_last ;       /* If set, don't show last move. */
X+ extern int do_number ;     /* If set, the last stone placed is numbered. */
X  extern int down ;          /* Indicates is a mouse button is down. */
X  extern int first_move ;    /* Set if computer plays first move. */
X  extern int iconic ;        /* Start as an icon if set. */
X***************
X*** 38,43 ****
X--- 43,49 ----
X  extern int ix ;            /* Initial X position of the icon. */
X  extern int iy ;            /* Initial Y position of the icon. */
X  extern int last_move ;     /* Last valid computer move. */
X+ extern int last_outline ;  /* Position of last piece whilst dragging. */
X  extern int level ;         /* Current difficulty level for computer moves. */
X  extern int loadgame ;      /* Set if there is a game file to load. */
X  extern int lsval ;         /* Set to 'l' or 's', if loading or saving. */
X***************
X*** 51,56 ****
X--- 57,63 ----
X  extern int piece_y ;       /* Current Y position of moving piece */
X  extern int play_computer ; /* Set if playing against the computer. */
X  extern int posspec ;       /* Set if -Wp or -g option is present (for X11) */
X+ extern int quickgame ;     /* If set, don't flash turning stones. */
X  extern int s_flip ;
X  extern int s_move ;
X  extern int s_opponent ;
X
X------- items.c -------
X*** /tmp/da02124	Wed Nov 28 11:00:26 1990
X--- items.c	Thu Nov 22 11:13:56 1990
X***************
X*** 133,139 ****
X    ty = BBORDER + BHEIGHT + BGAP ;
X    tw = (BWIDTH / 2) - 10 + (2 * (BWIDTH + BGAP)) ;
X    th = BHEIGHT ;
X!   draw_rect(tx, ty, tx + tw, ty + th) ;
X    draw_filename(gamefile) ;
X  
X    tinput = 1 ;
X--- 133,139 ----
X    ty = BBORDER + BHEIGHT + BGAP ;
X    tw = (BWIDTH / 2) - 10 + (2 * (BWIDTH + BGAP)) ;
X    th = BHEIGHT ;
X!   draw_rect(tx, ty, tx + tw, ty + th, RSRC, C_BLACK) ;
X    draw_filename(gamefile) ;
X  
X    tinput = 1 ;
X
END_OF_FILE
if test 43518 -ne `wc -c <'patches02a'`; then
    echo shar: \"'patches02a'\" unpacked with wrong size!
fi
# end of 'patches02a'
fi
echo shar: End of archive 1 \(of 3\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 3 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0