home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume11 / reve / patch1a < prev    next >
Encoding:
Internet Message Format  |  1990-12-11  |  55.2 KB

  1. Path: uunet!ogicse!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v11i061:  reve - an othello game, Patch1a
  5. Message-ID: <6565@tekred.CNA.TEK.COM>
  6. Date: 16 Nov 90 18:53:08 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1528
  9. Approved: billr@saab.CNA.TEK.COM
  10. Posted: Fri Nov 16 10:53:08 1990
  11.  
  12. Submitted-by: Rich Burridge <rburridge@sun.COM>
  13. Posting-number: Volume 11, Issue 61
  14. Archive-name: reve/Patch1a
  15. Patch-To: reve: Volume 11, Issue 52-58
  16. Environment: SunView, XView, X11R4, termcap
  17.  
  18.     [This was previously posted in comp.sources.games.bugs and
  19.     is being reposted here for archiving.  -br]
  20.  
  21. #! /bin/sh
  22. # This is a shell archive.  Remove anything before this line, then unpack
  23. # it by saving it into a file and typing "sh file".  To overwrite existing
  24. # files, type "sh file -c".  You can also feed this as standard input via
  25. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  26. # will see the following message at the end:
  27. #        "End of archive 1 (of 4)."
  28. # Contents:  README.PCH1 patches01a
  29. # Wrapped by billr@saab on Fri Nov 16 10:46:42 1990
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'README.PCH1' -a "${1}" != "-c" ; then 
  32.   echo shar: Will not clobber existing file \"'README.PCH1'\"
  33. else
  34. echo shar: Extracting \"'README.PCH1'\" \(9296 characters\)
  35. sed "s/^X//" >'README.PCH1' <<'END_OF_FILE'
  36. X
  37. X/*
  38. X *  Official patch #1 for Reve v1.1.
  39. X *
  40. X *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  41. X *  All rights reserved.
  42. X *
  43. X *  Permission is granted to copy this patch, for redistribution
  44. X *  in patch form only, provided the news headers in "substantially
  45. X *  unaltered format" are retained, the introductory messages are not
  46. X *  removed, and no monies are exchanged.
  47. X *
  48. X *  Permission is also granted to copy this patch, without the news
  49. X *  headers, for the purposes of patching the Reve source and making
  50. X *  an executable copy by means of compilation, provided that such
  51. X *  copy will not be used for the purposes of competition in any othello
  52. X *  tournaments, without prior permission from the authors.
  53. X */
  54. X
  55. XCONTENTS:
  56. X
  57. X1. What is reve?
  58. X2/ Changes made in this patch.
  59. X3/ How to install this patch.
  60. X
  61. X----------------
  62. X
  63. X1/ What is reve?
  64. X
  65. XReve is an othello game. It works under SunView, XView, X11 (Xlib) and on
  66. Xdumb tty terminals.
  67. X
  68. XReve has nine levels of difficulty. Levels 1-3 should be useful to beginners,
  69. Xlevels 4-6 would satisfy amateurs, and the higher levels will give experts a
  70. Xgood game. Level 8 (30 minutes) is the tournament level.
  71. X
  72. X----------------
  73. X
  74. X2/ Changes made in this patch.
  75. X
  76. X       * Time allocation function was out by 1. All the levels are shifted
  77. X         by 1. This explains why computer move selection at level 1 is so
  78. X         "slow".
  79. X
  80. X       * The sandwich routine in makemove.c, was accessing out of bounds
  81. X         elements in the square array.
  82. X
  83. X       * The play_reve routine in rev_ip.c, was accessing out-of bounds
  84. X         elements in the cpi, cpj and cpk arrays.
  85. X
  86. X       * black_dpy and white_dpy were declared inconsistently in main.c and
  87. X         extern.h
  88. X
  89. X       * If you select White->human, then Black->computer, Reve correctly
  90. X         plays the black computer move. If you then select Black->human
  91. X         followed by White->computer, Reve incorrectly made another move
  92. X         for black. There was a similar problem when starting a new game
  93. X         with Black being played by computer.
  94. X
  95. X       * Fixed up a few other inconsistencies found by Saber-C.
  96. X
  97. X       * Extraction of the optional X11 display names for the -b and -w
  98. X         options in get_options() was incorrect.
  99. X
  100. X       * If you used the suggest button, to get the computer to suggest a
  101. X         move, it was decrementing the time allowed for the computer.
  102. X
  103. X       * Adjusted entries 2191 and 2917 of the Reve edge stability table
  104. X         (in reve.edge2).
  105. X
  106. X       * Added in the code for a new tree algorithm from Yves (rev_eval.c
  107. X         and rev_ip.c).
  108. X
  109. X       * Added a -r command line option, which will write some computer
  110. X         move information to a reve.res file after each computer move. This
  111. X         is probably only of use to people trying to improve the computer
  112. X         algorithm. The manual pages has been updated.
  113. X
  114. X       * The computer move timing function in rev_ip.c now uses an alarm and
  115. X         signal, so should be independent of the machine it's running on.
  116. X
  117. X       * Changed the variable "depth" to "level". As Reve now uses a timing
  118. X         function to calculate it's computer moves, "depth" is not a true
  119. X         indication of depth.
  120. X
  121. X       * Changed all #include <strings.h> to #include string.h or strings.h
  122. X         depending upon whether SYSV was defined.
  123. X
  124. X       * The amount of computer time left for moves is now stored for each
  125. X         move, so that if a move is undone against the computer, the previous
  126. X         time left value is restored.
  127. X
  128. X       * Added in a -m command line line, which will start up Reve in
  129. X         monochrome only, even on a color screen.
  130. X
  131. X       * The last move made is now shown by putting a black square around
  132. X         the piece on the board. This is updated when a new move is made. The
  133. X         manual pages have been changed to mention this.
  134. X
  135. X       * The "last" panel button has been replaced with a "moves?" panel
  136. X         button (and rearranged to be alphabetical), which displays all the
  137. X         valid moves at any particular time. This is very useful for
  138. X         beginners and for teaching purposes. The manual pages have been
  139. X         updated to reflect these changes.
  140. X
  141. X       * Added in more hooks for two screen support for the X11 version.
  142. X
  143. X       * From Jonathan I. Kamens <jik@pit-manager.MIT.EDU>
  144. X         - Supplied a standard Imakefile for use with the X11 version of reve.
  145. X           The Imakefile expects the manual pages in (nroff'able format) to
  146. X           be in a file called reve.man, so reve.man needs to be renamed to
  147. X           reve.man.text, and reve.6 needs to be renamed to reve.man. This is
  148. X           detailed explicitly at the beginning of the instructions on how to
  149. X           apply this patch.
  150. X
  151. X         - If X11 is defined (It's defined in the Imake-generated Makefile),
  152. X           then include <X11/Xos.h>. That file does the index/strchr frobbing
  153. X           automatically. Affects boardstuff.c and main.c
  154. X
  155. X         - Removed the definition of FREAD in reve.h. Some systems use
  156. X           FREAD as a constant in /usr/include/sys/file.h. Incidentally,
  157. X           it was no longer needed.
  158. X
  159. X         - Only do the index/strchr frobbing if X11 isn't defined. Change
  160. X           to reve.h
  161. X
  162. X         - As far as I know, void-returning signal handlers are NOT part of
  163. X           standard BSD4.3, so your #ifdef name for that is a bit wrong.
  164. X           This name has been changed to INT_SIGNAL, and all the appropriate
  165. X           files updated.
  166. X
  167. X       * Included a new XView version of Reve from Valerie Haecky. Adjusted
  168. X         the "generic" sources to handle this. This involved moving
  169. X         draw_piece and draw_rect into boardstuff.c, and *not* including
  170. X         items.c when compiling the XView version. The XView version needs a
  171. X         -DXVIEW flag to correct setup five #defines in reve.h. The
  172. X         Makefile.dist has been updated to handle all this.
  173. X
  174. X       * The introductory messages in each file have been changed to try to
  175. X         state our wishes in the correct manner.
  176. X
  177. X       * From Krishnamurthy Ganesan <ganesan@cs.fau.edu>
  178. X         The processing of the readmask in the Xselect_input() routine in
  179. X         x11.c was incorrect for the non-BSD4.3 option. The parentheses
  180. X         were misplaced in two lines.
  181. X
  182. X       * From Gordon C. Galligher <telxon!ping!source@uunet.UU.NET>
  183. X         Several icons in the images sub-directory have had their names
  184. X         changed to less than 14 characters, so that they can work on
  185. X         System V machines.
  186. X
  187. X       * There was an offset problem when drawing the inverted piece
  188. X         for the first time on a mouse down. This was before it was
  189. X         dragged around.
  190. X
  191. X----------------
  192. X
  193. X3/ How to install this patch.
  194. X
  195. XThis patch consists of four parts. Save each one first. You should then
  196. Xuse Larry Wall's patch program to apply these changes. Assuming the four
  197. Xfiles are called patch1a, patch1b, patch1c and patch1d, do the following:
  198. X
  199. Xcd reve_src        # directory where your reve source files are.
  200. Xpatch <patch1a
  201. Xpatch <patch1b
  202. Xpatch <patch1c
  203. Xpatch <patch1d
  204. X
  205. XNote that this will create one new file called Imakefile.
  206. X
  207. X*IMPORTANT*
  208. X-----------
  209. X
  210. XAfter applying this patch you need to rename several files. This is for two
  211. Xreasons:
  212. X
  213. X  1/ The Imakefile file expects the manual pages (in nroff'able format), to
  214. X     be in a file called reve.man. So the two filename changes there are:
  215. X
  216. X       reve.man ==>  reve.man.text
  217. X       reve.6   ==>  reve.man
  218. X
  219. X  2/ There are several files in the images sub-directory which are greater
  220. X     then the 14 character filename limit allowed under System V. The
  221. X     changes here are:
  222. X
  223. X       button.invert.icon   ==> Ibutton.icon
  224. X       button.normal.icon   ==> Nbutton.icon
  225. X       button.stencil.icon  ==> Sbutton.icon
  226. X       cycle.glyph.icon     ==> Ncycle.icon
  227. X       cycle.linvert.icon   ==> Lcycle.icon
  228. X       cycle.rinvert.icon   ==> Rcycle.icon
  229. X       cycle.stencil.icon   ==> Scycle.icon
  230. X       reve.color.icon      ==> Creve.icon
  231. X
  232. XIf you are on a Unix machine, then you should run the following commands:
  233. X
  234. X       mv reve.man                   reve.man.text
  235. X       mv reve.6                     reve.man
  236. X       mv images/button.invert.icon  images/Ibutton.icon
  237. X       mv images/button.normal.icon  images/Nbutton.icon
  238. X       mv images/button.stencil.icon images/Sbutton.icon
  239. X       mv images/cycle.glyph.icon    images/Ncycle.icon
  240. X       mv images/cycle.linvert.icon  images/Lcycle.icon
  241. X       mv images/cycle.rinvert.icon  images/Rcycle.icon
  242. X       mv images/cycle.stencil.icon  images/Scycle.icon
  243. X       mv images/reve.color.icon     images/Creve.icon
  244. XIf you are running reve on another O/S, then you should do the equivalent
  245. Xof these moves.
  246. X
  247. XCopy Makefile.dist to Makefile, and adjust for your site. See the README
  248. Xfile for things you might have to tweak in order to get Reve to work on
  249. Xyour machine.
  250. X
  251. XYou will then have to do the appropriate make, to generate the graphics
  252. Xversion you require. Do a "make help" to obtain more information on this.
  253. X
  254. XFinally, you should do a "make install". You will probably have to be
  255. Xsuper-user to do this.
  256. X
  257. XIf you have any problems with Reve after applying this patch, and your
  258. Xproblem is not listed in the TODO file, please let us know.
  259. X
  260. XRich Burridge           richb@Aus.Sun.COM
  261. XYves Gallot             galloty@cernvax.cern.ch
  262. X
  263. END_OF_FILE
  264. if test 9296 -ne `wc -c <'README.PCH1'`; then
  265.     echo shar: \"'README.PCH1'\" unpacked with wrong size!
  266. fi
  267. # end of 'README.PCH1'
  268. fi
  269. if test -f 'patches01a' -a "${1}" != "-c" ; then 
  270.   echo shar: Will not clobber existing file \"'patches01a'\"
  271. else
  272. echo shar: Extracting \"'patches01a'\" \(43501 characters\)
  273. sed "s/^X//" >'patches01a' <<'END_OF_FILE'
  274. X
  275. X------- patchlevel.h -------
  276. XPrereq: 0
  277. X*** /tmp/da28531    Fri Nov  9 10:13:21 1990
  278. X--- patchlevel.h    Mon Nov  5 09:06:16 1990
  279. X***************
  280. X*** 6,16 ****
  281. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  282. X   *  All rights reserved.
  283. X   *
  284. X!  *  Permission is given to distribute these sources, as long as the
  285. X!  *  introductory messages are not removed, and no monies are exchanged.
  286. X   *
  287. X!  *  You are forbidden from using Reve as is, or in a modified state, in
  288. X!  *  any tournaments, without the permission of the authors.
  289. X   *
  290. X   *  No responsibility is taken for any errors on inaccuracies inherent
  291. X   *  either to the comments or the code of this program, but if reported
  292. X--- 6,21 ----
  293. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  294. X   *  All rights reserved.
  295. X   *
  296. X!  *  Permission is granted to copy this source, for redistribution
  297. X!  *  in source form only, provided the news headers in "substantially
  298. X!  *  unaltered format" are retained, the introductory messages are not
  299. X!  *  removed, and no monies are exchanged.
  300. X   *
  301. X!  *  Permission is also granted to copy this source, without the
  302. X!  *  news headers, for the purposes of making an executable copy by
  303. X!  *  means of compilation, provided that such copy will not be used
  304. X!  *  for the purposes of competition in any othello tournaments, without
  305. X!  *  prior permission from the authors.
  306. X   *
  307. X   *  No responsibility is taken for any errors on inaccuracies inherent
  308. X   *  either to the comments or the code of this program, but if reported
  309. X***************
  310. X*** 17,20 ****
  311. X   *  (see README file), then an attempt will be made to fix them.
  312. X   */
  313. X  
  314. X! #define  PATCHLEVEL  0
  315. X--- 22,25 ----
  316. X   *  (see README file), then an attempt will be made to fix them.
  317. X   */
  318. X  
  319. X! #define  PATCHLEVEL  1
  320. X*** /dev/null    Fri Nov  9 10:01:02 1990
  321. X--- Imakefile    Fri Nov  9 10:15:13 1990
  322. X***************
  323. X*** 0 ****
  324. X--- 1,88 ----
  325. X+ 
  326. X+ /*  @(#)Imakefile 1.2 90/11/09
  327. X+  *
  328. X+  *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  329. X+  *  All rights reserved.
  330. X+  *
  331. X+  *  Permission is granted to copy this source, for redistribution
  332. X+  *  in source form only, provided the news headers in "substantially
  333. X+  *  unaltered format" are retained, the introductory messages are not
  334. X+  *  removed, and no monies are exchanged.
  335. X+  *
  336. X+  *  Permission is also granted to copy this source, without the
  337. X+  *  news headers, for the purposes of making an executable copy by
  338. X+  *  means of compilation, provided that such copy will not be used
  339. X+  *  for the purposes of competition in any othello tournaments, without
  340. X+  *  prior permission from the authors.
  341. X+  *
  342. X+  *  No responsibility is taken for any errors inherent either
  343. X+  *  to the comments or the code of this program, but if reported
  344. X+  *  (see README file), then an attempt will be made to fix them.
  345. X+  *
  346. X+  *------------------------------------------------------------------------
  347. X+  *  There are various small changes needed when compiling reve on
  348. X+  *  different systems. These have been isolated here, and should be
  349. X+  *  uncommented if needed.
  350. X+  *
  351. X+  *
  352. X+  *  Not every version of Unix (in particular System V derivitives) has the
  353. X+  *  select() system call. If your machine doesn't have this call, then you
  354. X+  *  need to uncomment the following definition.
  355. X+  *
  356. X+  *NOSELECT        = -DNOSELECT
  357. X+  *
  358. X+  *
  359. X+  *  Some machines do not have the usleep library function. If this is
  360. X+  *  true, then you will need to uncomment this definition.
  361. X+  *
  362. X+  *NO_USLEEP      = -DNO_USLEEP
  363. X+  */
  364. X+ 
  365. X+ #ifdef UltrixArchitecture
  366. X+ NO_USLEEP    = -DNO_USLEEP
  367. X+ #endif
  368. X+ 
  369. X+ /*  If you not running under a BSD4.3 derived system, the parameters
  370. X+  *  to the select call are different, and this definition should be
  371. X+  *  uncommented. You need to uncomment this for SunOS v3.x.
  372. X+  *
  373. X+  *SELTYPE        = -DNO_43SELECT
  374. X+  */
  375. X+ 
  376. X+ 
  377. X+ /*  YOU SHOULD NOT NEED TO MODIFY ANYTHING BELOW HERE.  */
  378. X+      
  379. X+ #if HasVoidSignalReturn == NO
  380. X+ SIGRET    =    -DINT_SIGNAL
  381. X+ #endif
  382. X+      
  383. X+ /*  Compilation flags and standard macro definitions.  */
  384. X+ 
  385. X+ SYS_LIBRARIES    = $(XLIB)     
  386. X+ CDEFS        = $(NOSELECT) $(NO_USLEEP) $(EDGENAME) $(SELTYPE) \
  387. X+           $(SIGRET)
  388. X+ DEFINES         = $(CDEFS) -DX11
  389. X+ ETABLE        = reve.edgetable
  390. X+ LIBDIR        = $(USRLIBDIR)/reve
  391. X+      
  392. X+ /*
  393. X+  *  Full pathname of the reve edge table file. This can also be overridden
  394. X+  *  with a command line option.
  395. X+  */
  396. X+ EDGENAMEFILE    = $(LIBDIR)/$(ETABLE)
  397. X+ EDGENAME        = -DEDGENAME=\"$(EDGENAMEFILE)\"
  398. X+ 
  399. X+      
  400. X+ SRCS        = boardstuff.c events.c items.c makemove.c main.c \
  401. X+           procs.c rev_eval.c rev_ip.c rev_iycp.c x11.c
  402. X+ OBJS        = boardstuff.o events.o items.o makemove.o main.o \
  403. X+           procs.o rev_eval.o rev_ip.o rev_iycp.o x11.o
  404. X+ 
  405. X+ ComplexProgramTarget(reve)
  406. X+ MakeDirectories(install,$(LIBDIR))
  407. X+ InstallNonExec($(ETABLE),$(LIBDIR))
  408. X+ 
  409. X+ install:: install.man
  410. X+ 
  411. X+ $(ETABLE): reve.edge1 reve.edge2
  412. X+     cat reve.edge1 reve.edge2 > $(ETABLE)
  413. X
  414. X------- CHANGES -------
  415. X*** /tmp/da28687    Fri Nov  9 10:24:57 1990
  416. X--- CHANGES    Fri Nov  9 10:17:27 1990
  417. X***************
  418. X*** 4,14 ****
  419. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  420. X   *  All rights reserved.
  421. X   *
  422. X!  *  Permission is given to distribute these sources, as long as the
  423. X!  *  introductory messages are not removed, and no monies are exchanged.
  424. X   *
  425. X!  *  You are forbidden from using Reve as is, or in a modified state, in
  426. X!  *  any tournaments, without the permission of the authors.
  427. X   *
  428. X   *  No responsibility is taken for any errors on inaccuracies inherent
  429. X   *  either to the comments or the code of this program, but if reported
  430. X--- 4,19 ----
  431. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  432. X   *  All rights reserved.
  433. X   *
  434. X!  *  Permission is granted to copy this source, for redistribution
  435. X!  *  in source form only, provided the news headers in "substantially
  436. X!  *  unaltered format" are retained, the introductory messages are not
  437. X!  *  removed, and no monies are exchanged.
  438. X   *
  439. X!  *  Permission is also granted to copy this source, without the
  440. X!  *  news headers, for the purposes of making an executable copy by
  441. X!  *  means of compilation, provided that such copy will not be used
  442. X!  *  for the purposes of competition in any othello tournaments, without
  443. X!  *  prior permission from the authors.
  444. X   *
  445. X   *  No responsibility is taken for any errors on inaccuracies inherent
  446. X   *  either to the comments or the code of this program, but if reported
  447. X***************
  448. X*** 17,22 ****
  449. X--- 22,144 ----
  450. X  
  451. X  Reve change history.
  452. X  ====================
  453. X+ 
  454. X+ v1.1 - patchlevel 1. 9th November 1990.
  455. X+ 
  456. X+        * Time allocation function was out by 1. All the levels are shifted
  457. X+          by 1. This explains why computer move selection at level 1 is so
  458. X+          "slow".
  459. X+ 
  460. X+        * The sandwich routine in makemove.c, was accessing out of bounds
  461. X+          elements in the square array.
  462. X+ 
  463. X+        * The play_reve routine in rev_ip.c, was accessing out-of bounds
  464. X+          elements in the cpi, cpj and cpk arrays.
  465. X+ 
  466. X+        * black_dpy and white_dpy were declared inconsistently in main.c and
  467. X+          extern.h
  468. X+ 
  469. X+        * If you select White->human, then Black->computer, Reve correctly
  470. X+          plays the black computer move. If you then select Black->human
  471. X+          followed by White->computer, Reve incorrectly made another move
  472. X+          for black. There was a similar problem when starting a new game
  473. X+          with Black being played by computer.
  474. X+ 
  475. X+        * Fixed up a few other inconsistencies found by Saber-C.
  476. X+ 
  477. X+        * Extraction of the optional X11 display names for the -b and -w
  478. X+          options in get_options() was incorrect.
  479. X+ 
  480. X+        * If you used the suggest button, to get the computer to suggest a
  481. X+          move, it was decrementing the time allowed for the computer.
  482. X+ 
  483. X+        * Adjusted entries 2191 and 2917 of the Reve edge stability table
  484. X+          (in reve.edge2).
  485. X+ 
  486. X+        * Added in the code for a new tree algorithm from Yves (rev_eval.c
  487. X+          and rev_ip.c).
  488. X+ 
  489. X+        * Added a -r command line option, which will write some computer
  490. X+          move information to a reve.res file after each computer move. This
  491. X+          is probably only of use to people trying to improve the computer
  492. X+          algorithm. The manual pages has been updated.
  493. X+ 
  494. X+        * The computer move timing function in rev_ip.c now uses an alarm and
  495. X+          signal, so should be independent of the machine it's running on.
  496. X+ 
  497. X+        * Changed the variable "depth" to "level". As Reve now uses a timing
  498. X+          function to calculate it's computer moves, "depth" is not a true
  499. X+          indication of depth.
  500. X+ 
  501. X+        * Changed all #include <strings.h> to #include string.h or strings.h
  502. X+          depending upon whether SYSV was defined.
  503. X+ 
  504. X+        * The amount of computer time left for moves is now stored for each
  505. X+          move, so that if a move is undone against the computer, the previous
  506. X+          time left value is restored.
  507. X+ 
  508. X+        * Added in a -m command line line, which will start up Reve in
  509. X+          monochrome only, even on a color screen.
  510. X+ 
  511. X+        * The last move made is now shown by putting a black square around
  512. X+          the piece on the board. This is updated when a new move is made. The
  513. X+          manual pages have been changed to mention this.
  514. X+ 
  515. X+        * The "last" panel button has been replaced with a "moves?" panel
  516. X+          button (and rearranged to be alphabetical), which displays all the
  517. X+          valid moves at any particular time. This is very useful for
  518. X+          beginners and for teaching purposes. The manual pages have been
  519. X+          updated to reflect these changes.
  520. X+ 
  521. X+        * Added in more hooks for two screen support for the X11 version.
  522. X+ 
  523. X+        * From Jonathan I. Kamens <jik@pit-manager.MIT.EDU>
  524. X+          - Supplied a standard Imakefile for use with the X11 version of reve.
  525. X+            The Imakefile expects the manual pages in (nroff'able format) to
  526. X+            be in a file called reve.man, so reve.man needs to be renamed to
  527. X+            reve.man.text, and reve.6 needs to be renamed to reve.man. This is
  528. X+            detailed explicitly at the beginning of the instructions on how to
  529. X+            apply this patch.
  530. X+ 
  531. X+          - If X11 is defined (It's defined in the Imake-generated Makefile),
  532. X+            then include <X11/Xos.h>. That file does the index/strchr frobbing
  533. X+            automatically. Affects boardstuff.c and main.c
  534. X+ 
  535. X+          - Removed the definition of FREAD in reve.h. Some systems use
  536. X+            FREAD as a constant in /usr/include/sys/file.h. Incidentally,
  537. X+            it was no longer needed.
  538. X+ 
  539. X+          - Only do the index/strchr frobbing if X11 isn't defined. Change
  540. X+            to reve.h
  541. X+ 
  542. X+          - As far as I know, void-returning signal handlers are NOT part of
  543. X+            standard BSD4.3, so your #ifdef name for that is a bit wrong.
  544. X+            This name has been changed to INT_SIGNAL, and all the appropriate
  545. X+            files updated.
  546. X+ 
  547. X+        * Included a new XView version of Reve from Valerie Haecky. Adjusted
  548. X+          the "generic" sources to handle this. This involved moving
  549. X+          draw_piece and draw_rect into boardstuff.c, and *not* including
  550. X+          items.c when compiling the XView version. The XView version needs a
  551. X+          -DXVIEW flag to correct setup five #defines in reve.h. The
  552. X+          Makefile.dist has been updated to handle all this.
  553. X+ 
  554. X+        * The introductory messages in each file have been changed to try to
  555. X+          state our wishes in the correct manner.
  556. X+ 
  557. X+        * From Krishnamurthy Ganesan <ganesan@cs.fau.edu>
  558. X+          The processing of the readmask in the Xselect_input() routine in
  559. X+          x11.c was incorrect for the non-BSD4.3 option. The parentheses
  560. X+          were misplaced in two lines.
  561. X+ 
  562. X+        * From Gordon C. Galligher <telxon!ping!source@uunet.UU.NET>
  563. X+          Several icons in the images sub-directory have had their names
  564. X+          changed to less than 14 characters, so that they can work on
  565. X+          System V machines.
  566. X+ 
  567. X+        * There was an offset problem when drawing the inverted piece
  568. X+          for the first time on a mouse down. This was before it was
  569. X+          dragged around.
  570. X  
  571. X  v1.1 - patchlevel 0. 22nd October 1990.
  572. X  
  573. X
  574. X------- Makefile.dist -------
  575. X*** /tmp/da28690    Fri Nov  9 10:24:58 1990
  576. X--- Makefile.dist    Thu Nov  8 10:35:39 1990
  577. X***************
  578. X*** 6,16 ****
  579. X  #  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  580. X  #  All rights reserved.
  581. X  #
  582. X! #  Permission is given to distribute these sources, as long as the
  583. X! #  introductory messages are not removed, and no monies are exchanged.
  584. X  #
  585. X! #  You are forbidden from using Reve as is, or in a modified state, in
  586. X! #  any tournaments, without the permission of the authors.
  587. X  #
  588. X  #  No responsibility is taken for any errors inherent either
  589. X  #  to the comments or the code of this program, but if reported
  590. X--- 6,21 ----
  591. X  #  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  592. X  #  All rights reserved.
  593. X  #
  594. X! #  Permission is granted to copy this source, for redistribution
  595. X! #  in source form only, provided the news headers in "substantially
  596. X! #  unaltered format" are retained, the introductory messages are not
  597. X! #  removed, and no monies are exchanged.
  598. X  #
  599. X! #  Permission is also granted to copy this source, without the
  600. X! #  news headers, for the purposes of making an executable copy by
  601. X! #  means of compilation, provided that such copy will not be used
  602. X! #  for the purposes of competition in any othello tournaments, without
  603. X! #  prior permission from the authors.
  604. X  #
  605. X  #  No responsibility is taken for any errors inherent either
  606. X  #  to the comments or the code of this program, but if reported
  607. X***************
  608. X*** 52,63 ****
  609. X  #
  610. X  #SELTYPE        = -DNO_43SELECT
  611. X  #-----------------------------------------------------------------------
  612. X! #  If you are not running under a BSD4.3 derived system, then the
  613. X! #  second parameter to a signal call is a pointer to an integer function,
  614. X! #  and this definition needs to be uncommented. You need to uncomment this
  615. X! #  for SunOS v3.x.
  616. X  #
  617. X! #SIGRET         = -DNO_4_3SIGNAL
  618. X  #-----------------------------------------------------------------------
  619. X  #  If you are running on a 80286 machine, Microport's 5.2 port of SYSV,
  620. X  #  SVAT, or Xenix286, then you will need to uncomment this definition.
  621. X--- 57,67 ----
  622. X  #
  623. X  #SELTYPE        = -DNO_43SELECT
  624. X  #-----------------------------------------------------------------------
  625. X! #  If you are running on a system, where the second parameter to a signal
  626. X! #  call is a pointer to an integer function, then this definition needs
  627. X! #  to be uncommented.
  628. X  #
  629. X! #SIGRET         = -DINT_SIGNAL
  630. X  #-----------------------------------------------------------------------
  631. X  #  If you are running on a 80286 machine, Microport's 5.2 port of SYSV,
  632. X  #  SVAT, or Xenix286, then you will need to uncomment this definition.
  633. X***************
  634. X*** 75,81 ****
  635. X  #  If you are compiling the XView version, then the following two lines
  636. X  #  should be uncommented, and set appropriately.
  637. X  #
  638. X! #XVIEWINCDIR      = -I$(OPENWINHOME)/include
  639. X  #XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
  640. X  #
  641. X  #===========================================================================
  642. X--- 79,85 ----
  643. X  #  If you are compiling the XView version, then the following two lines
  644. X  #  should be uncommented, and set appropriately.
  645. X  #
  646. X! #XVIEWINCDIR      = -I$(OPENWINHOME)/include -DXVIEW
  647. X  #XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
  648. X  #
  649. X  #===========================================================================
  650. X***************
  651. X*** 96,109 ****
  652. X  #
  653. X  #==========================================================================
  654. X  
  655. X  BINARIES        = sv_reve tty_reve xreve xv_reve
  656. X  ETABLE        = reve.edgetable
  657. X  
  658. X  CC              = cc
  659. X  
  660. X! STDSRCS         = boardstuff.c events.c items.c makemove.c main.c \
  661. X            procs.c rev_eval.c rev_ip.c rev_iycp.c
  662. X! STDOBJS         = boardstuff.o events.o items.o makemove.o main.o \
  663. X            procs.o rev_eval.o rev_ip.o rev_iycp.o
  664. X  
  665. X  GSRCS           = sunview.c tty.c x11.c xview.c
  666. X--- 100,115 ----
  667. X  #
  668. X  #==========================================================================
  669. X  
  670. X+ .KEEP_STATE:
  671. X+ 
  672. X  BINARIES        = sv_reve tty_reve xreve xv_reve
  673. X  ETABLE        = reve.edgetable
  674. X  
  675. X  CC              = cc
  676. X  
  677. X! STDSRCS         = boardstuff.c events.c makemove.c main.c \
  678. X            procs.c rev_eval.c rev_ip.c rev_iycp.c
  679. X! STDOBJS         = boardstuff.o events.o makemove.o main.o \
  680. X            procs.o rev_eval.o rev_ip.o rev_iycp.o
  681. X  
  682. X  GSRCS           = sunview.c tty.c x11.c xview.c
  683. X***************
  684. X*** 111,125 ****
  685. X  IDIR        = images
  686. X  IMAGES          = $(IDIR)/black.icon \
  687. X            $(IDIR)/reve.icon \
  688. X!           $(IDIR)/reve.color.icon \
  689. X            $(IDIR)/white.icon \
  690. X!           $(IDIR)/button.invert.icon \
  691. X!           $(IDIR)/button.normal.icon \
  692. X!           $(IDIR)/button.stencil.icon \
  693. X!           $(IDIR)/cycle.glyph.icon \
  694. X!           $(IDIR)/cycle.linvert.icon \
  695. X!           $(IDIR)/cycle.rinvert.icon \
  696. X!           $(IDIR)/cycle.stencil.icon \
  697. X            $(IDIR)/hglass.cursor \
  698. X            $(IDIR)/nocur.cursor
  699. X  
  700. X--- 117,131 ----
  701. X  IDIR        = images
  702. X  IMAGES          = $(IDIR)/black.icon \
  703. X            $(IDIR)/reve.icon \
  704. X!           $(IDIR)/Creve.icon \
  705. X            $(IDIR)/white.icon \
  706. X!           $(IDIR)/Ibutton.icon \
  707. X!           $(IDIR)/Nbutton.icon \
  708. X!           $(IDIR)/Sbutton.icon \
  709. X!           $(IDIR)/Ncycle.icon \
  710. X!           $(IDIR)/Lcycle.icon \
  711. X!           $(IDIR)/Rcycle.icon \
  712. X!           $(IDIR)/Scycle.icon \
  713. X            $(IDIR)/hglass.cursor \
  714. X            $(IDIR)/nocur.cursor
  715. X  
  716. X***************
  717. X*** 130,136 ****
  718. X  SFILES2        = boardstuff.c rev_eval.c rev_ip.c rev_iycp.c $(HDRS)
  719. X  SFILES3         = $(OTHERS)
  720. X  SFILES4         = tty.c x11.c xview.c
  721. X! SFILES5        = sunview.c $(IDIR)
  722. X  SFILES6        = reve.edge1
  723. X  SFILES7        = reve.edge2
  724. X  
  725. X--- 136,142 ----
  726. X  SFILES2        = boardstuff.c rev_eval.c rev_ip.c rev_iycp.c $(HDRS)
  727. X  SFILES3         = $(OTHERS)
  728. X  SFILES4         = tty.c x11.c xview.c
  729. X! SFILES5        = sunview.c $(IDIR) Imakefile
  730. X  SFILES6        = reve.edge1
  731. X  SFILES7        = reve.edge2
  732. X  
  733. X***************
  734. X*** 156,171 ****
  735. X  
  736. X  all:            $(BINARIES)
  737. X  
  738. X! sunview:        $(STDOBJS) sunview.o
  739. X!         $(CC) -o sv_reve $(CFLAGS) $(STDOBJS) sunview.o $(SVIEWLIBS)
  740. X          -cp sv_reve reve
  741. X  
  742. X! tty:            $(STDOBJS) tty.o
  743. X!         $(CC) -o tty_reve $(CFLAGS) $(STDOBJS) tty.o $(TTYLIBS)
  744. X          -cp tty_reve reve
  745. X  
  746. X! x11:            $(STDOBJS) x11.o
  747. X!         $(CC) -o xreve $(X11LIBDIR) $(CFLAGS) $(STDOBJS) x11.o \
  748. X                     $(X11LIBS)
  749. X          -cp xreve reve
  750. X  
  751. X--- 162,180 ----
  752. X  
  753. X  all:            $(BINARIES)
  754. X  
  755. X! sunview:        $(STDOBJS) items.o sunview.o
  756. X!         $(CC) -o sv_reve $(CFLAGS) $(STDOBJS) \
  757. X!                 items.o sunview.o $(SVIEWLIBS)
  758. X          -cp sv_reve reve
  759. X  
  760. X! tty:            $(STDOBJS) items.o tty.o
  761. X!         $(CC) -o tty_reve $(CFLAGS) $(STDOBJS) \
  762. X!                 items.o tty.o $(TTYLIBS)
  763. X          -cp tty_reve reve
  764. X  
  765. X! x11:            $(STDOBJS) items.o x11.o
  766. X!         $(CC) -o xreve $(X11LIBDIR) $(CFLAGS) $(STDOBJS) \
  767. X!                 items.o x11.o \
  768. X                     $(X11LIBS)
  769. X          -cp xreve reve
  770. X  
  771. X***************
  772. X*** 187,199 ****
  773. X  clean:;         rm -f *.o *.Z *.uu Part* *~ reve $(BINARIES) core
  774. X  
  775. X  lint:        lint-sunview lint-tty lint-xview lint-x11
  776. X! lint-sunview:;    lint $(CDEFS) $(STDSRCS) sunview.c $(SVIEWLIBS)
  777. X! lint-tty:;    lint $(CDEFS) $(STDSRCS) tty.c $(TTYLIBS)
  778. X  lint-xview:;    lint $(CDEFS) $(STDSRCS) xview.c $(XVIEWLIBS) 
  779. X! lint-x11:;    lint $(CDEFS) $(STDSRCS) x11.c $(X11LIBS) 
  780. X  
  781. X  saber:        $(STDSRCS) x11.c
  782. X!         #load $(LDFLAGS) $(CDEFS) $(STDSRCS) x11.c $(X11LIBS)
  783. X  
  784. X  shar:;          shar.script $(SFILES1) > Part1
  785. X          shar.script $(SFILES2) > Part2
  786. X--- 196,208 ----
  787. X  clean:;         rm -f *.o *.Z *.uu Part* *~ reve $(BINARIES) core
  788. X  
  789. X  lint:        lint-sunview lint-tty lint-xview lint-x11
  790. X! lint-sunview:;    lint $(CDEFS) $(STDSRCS) items.c sunview.c $(SVIEWLIBS)
  791. X! lint-tty:;    lint $(CDEFS) $(STDSRCS) items.c tty.c $(TTYLIBS)
  792. X  lint-xview:;    lint $(CDEFS) $(STDSRCS) xview.c $(XVIEWLIBS) 
  793. X! lint-x11:;    lint $(CDEFS) $(STDSRCS) items.c x11.c $(X11LIBS) 
  794. X  
  795. X  saber:        $(STDSRCS) x11.c
  796. X!         #load $(LDFLAGS) $(CDEFS) $(STDSRCS) items.c x11.c $(X11LIBS)
  797. X  
  798. X  shar:;          shar.script $(SFILES1) > Part1
  799. X          shar.script $(SFILES2) > Part2
  800. X***************
  801. X*** 204,210 ****
  802. X          shar.script $(SFILES7) > Part7
  803. X  
  804. X  create:         SCCS
  805. X!         -sccs create $(STDSRCS) $(GSRCS) $(HDRS) $(IMAGES) $(OTHERS)
  806. X  
  807. X  SCCS:
  808. X          mkdir SCCS
  809. X--- 213,220 ----
  810. X          shar.script $(SFILES7) > Part7
  811. X  
  812. X  create:         SCCS
  813. X!         -sccs create $(STDSRCS) items.c $(GSRCS) $(HDRS) \
  814. X!                  $(IMAGES) $(OTHERS)
  815. X  
  816. X  SCCS:
  817. X          mkdir SCCS
  818. X
  819. X------- README -------
  820. X*** /tmp/da28693    Fri Nov  9 10:24:59 1990
  821. X--- README    Wed Nov  7 11:41:54 1990
  822. X***************
  823. X*** 4,14 ****
  824. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  825. X   *  All rights reserved.
  826. X   *
  827. X!  *  Permission is given to distribute these sources, as long as the
  828. X!  *  introductory messages are not removed, and no monies are exchanged.
  829. X   *
  830. X!  *  You are forbidden from using Reve as is, or in a modified state, in
  831. X!  *  any tournaments, without the permission of the authors.
  832. X   *
  833. X   *  No responsibility is taken for any errors on inaccuracies inherent
  834. X   *  either to the comments or the code of this program, but if reported
  835. X--- 4,19 ----
  836. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  837. X   *  All rights reserved.
  838. X   *
  839. X!  *  Permission is granted to copy this source, for redistribution
  840. X!  *  in source form only, provided the news headers in "substantially
  841. X!  *  unaltered format" are retained, the introductory messages are not
  842. X!  *  removed, and no monies are exchanged.
  843. X   *
  844. X!  *  Permission is also granted to copy this source, without the
  845. X!  *  news headers, for the purposes of making an executable copy by
  846. X!  *  means of compilation, provided that such copy will not be used
  847. X!  *  for the purposes of competition in any othello tournaments, without
  848. X!  *  prior permission from the authors.
  849. X   *
  850. X   *  No responsibility is taken for any errors on inaccuracies inherent
  851. X   *  either to the comments or the code of this program, but if reported
  852. X***************
  853. X*** 187,193 ****
  854. X  Steve Misrack, Hugues Leroy, Linton Miller, Mike Stump, D. Hugh Redelmeier,
  855. X  Scott W. Danielson, Gary D. Kline, Kjetil Torgrim Homme, Peter Johansson,
  856. X  Alfred Nathaniel, Arnold Gill, Martin Chudley, W Mat Waites, Keith Moore,
  857. X! John Eras and Heather Rose for bug reports and/or bug fixes plus suggested
  858. X  enhancements.
  859. X  
  860. X  Suggestions for furthur improvement would be most welcome, plus bugs,
  861. X--- 192,199 ----
  862. X  Steve Misrack, Hugues Leroy, Linton Miller, Mike Stump, D. Hugh Redelmeier,
  863. X  Scott W. Danielson, Gary D. Kline, Kjetil Torgrim Homme, Peter Johansson,
  864. X  Alfred Nathaniel, Arnold Gill, Martin Chudley, W Mat Waites, Keith Moore,
  865. X! John Eras, Heather Rose, Jonathan I. Kamens, Krishnamurthy Ganesan and
  866. X! Gordon C. Galligher for bug reports and/or bug fixes plus suggested
  867. X  enhancements.
  868. X  
  869. X  Suggestions for furthur improvement would be most welcome, plus bugs,
  870. X
  871. X------- TODO -------
  872. X*** /tmp/da28696    Fri Nov  9 10:24:59 1990
  873. X--- TODO    Fri Nov  9 09:38:18 1990
  874. X***************
  875. X*** 4,14 ****
  876. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  877. X   *  All rights reserved.
  878. X   *
  879. X!  *  Permission is given to distribute these sources, as long as the
  880. X!  *  introductory messages are not removed, and no monies are exchanged.
  881. X   *
  882. X!  *  You are forbidden from using Reve as is, or in a modified state, in
  883. X!  *  any tournaments, without the permission of the authors.
  884. X   *
  885. X   *  No responsibility is taken for any errors on inaccuracies inherent
  886. X   *  either to the comments or the code of this program, but if reported
  887. X--- 4,19 ----
  888. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  889. X   *  All rights reserved.
  890. X   *
  891. X!  *  Permission is granted to copy this source, for redistribution
  892. X!  *  in source form only, provided the news headers in "substantially
  893. X!  *  unaltered format" are retained, the introductory messages are not
  894. X!  *  removed, and no monies are exchanged.
  895. X   *
  896. X!  *  Permission is also granted to copy this source, without the
  897. X!  *  news headers, for the purposes of making an executable copy by
  898. X!  *  means of compilation, provided that such copy will not be used
  899. X!  *  for the purposes of competition in any othello tournaments, without
  900. X!  *  prior permission from the authors.
  901. X   *
  902. X   *  No responsibility is taken for any errors on inaccuracies inherent
  903. X   *  either to the comments or the code of this program, but if reported
  904. X***************
  905. X*** 20,37 ****
  906. X  
  907. X  1/ Finish off the X11 "two screens on two machines" version. The hooks are
  908. X     all in place, but not enough spare time...
  909. X  
  910. X  2/ Allow the computer to play itself. Currently this option is disabled,
  911. X     because of the inability with some of the graphics versions to interrupt
  912. X     it, once it's started.
  913. X  
  914. X! 3/ From Valerie Haecky <vmh@Eng>
  915. X!    It might be nice to have an additional button for <help>. It pops up an
  916. X!    alert, giving a short summary of the rules and explaining things, like
  917. X!    how Difficulty is measured.
  918. X  
  919. X! 4/ With the XView version, disable MS_LEFT whilst the computer is having
  920. X!    its move. At the moment, if you press the left mouse button while the
  921. X!    computer is doing something, the server will hang.
  922. X  
  923. X! 5/ The color icon doesn't display properly with the XView version.
  924. X--- 25,143 ----
  925. X  
  926. X  1/ Finish off the X11 "two screens on two machines" version. The hooks are
  927. X     all in place, but not enough spare time...
  928. X+    ~ The cursors in x11.c will need to be allocated for each screen
  929. X+      separately.
  930. X+    ~ In the process_event routine, only allow the FRAME_REPAINT event
  931. X+      through if it's now this persons go. Otherwise output a panel message
  932. X+      telling the user to wait her/his turn.
  933. X+    ~ Changing the Black: and White: cyclic items should have a null effect
  934. X+      if dtype is XTWO. Output a message to this effect.
  935. X+    ~ If dtype is XTWO, then message and draw_piece should output to both
  936. X+      screens. There are probably other routines where this should be the case.
  937. X+    ~ There will be a few other places where certain routines will need to
  938. X+      output to both displays if dtype is XTWO.
  939. X  
  940. X  2/ Allow the computer to play itself. Currently this option is disabled,
  941. X     because of the inability with some of the graphics versions to interrupt
  942. X     it, once it's started.
  943. X  
  944. X! 3/ From Valerie Haecky <vmh@Eng.Sun.COM>
  945. X!    It might be nice to have an additional button for <help>.
  946. X!    It pops up an alert, giving a short summary of the rules
  947. X!    and explaining non-obvious things, like how Difficulty is measured.
  948. X  
  949. X! 4/ There are several problems outstanding with the XView version:
  950. X!    ~ **IMPORTANT** Need to find some way to disable MS_LEFT whilst the
  951. X!                    computer is having its move. At the moment, if you press
  952. X!                    the left mouse button while the computer is doing something,
  953. X!                    the server will hang.
  954. X!    ~ The game panel doesn't correct repaint itself. You need to select
  955. X!      "Refresh" from the frame menu.
  956. X!    ~ The hourglass cursor should be drawn in XOR mode.
  957. X!    ~ The board window should not have a window menu.
  958. X!    ~ The game board isn't correctly painted with the -m command line option.
  959. X!    ~ When you click to get the panel window to the top, the game board should
  960. X!      also be raised.
  961. X!    ~ The alignment and size of some of the items needs to be adjusted to be
  962. X!      more consistent.
  963. X!    ~ The color icon doesn't get displayed properly.
  964. X!    ~ Would be nice to be able to close the game panel and leave the board
  965. X!      window open. Status information could be written to a title line and a
  966. X!      window footer (messages such as the number of stones each player
  967. X!      currently has; whose turn it is to move could be placed in the title
  968. X!      line, and panel messages such as invalid move could be written to the
  969. X!      footer.
  970. X  
  971. X! 5/ There appears to be a bug with the X11 implementation on an IBM RS6000.
  972. X!    When the computer moves a piece from the upper-left border to its place,
  973. X!    a "trace" appears along its path. The color of this trace is the color of
  974. X!    the background of the screen.
  975. X! 
  976. X! 6/ Need to allow options like -scale through on the command line. This can
  977. X!    be done by have an init_graphics() routine that gets called right at
  978. X!    the start, which strips off graphics specific options.
  979. X! 
  980. X! 7/ Need to add in the ability to show the last move, and show all moves to
  981. X!    the tty version.
  982. X! 
  983. X! 8/ From Valerie Haecky <vmh@Eng.Sun.COM>
  984. X!    Display the time left for the user[s] and computer.
  985. X! 
  986. X! 9/ From Valerie Haecky <vmh@Eng.Sun.COM>
  987. X!    Showing the last move could be optional.
  988. X! 
  989. X! 10/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  990. X!     ~ Provide an option or button to toggle the animation of the computer
  991. X!       piece from the top-left corner onto the board. On slow workstations,
  992. X!       this is embarrassingly flickery and quite distracting.
  993. X! 
  994. X!     ~ Ditto for the flash of the turned over pieces - it slows down the game
  995. X!       when you just want a quick game.
  996. X! 
  997. X!     ~ Add the ability to change the default background colour of the board to
  998. X!       a (not too bright !) green colour. After all, that's the colour of the
  999. X!       othello sets you buy in the shops!
  1000. X!  
  1001. X!     [I'll do these with settable resources. I'll allow you to set some of
  1002. X!      them on the command line, and I'll add a .reverc file, which will be read
  1003. X!      from the users home directory. For the X11/XView versions, I'll allow the
  1004. X!      resources to be set in all the standard X places, and the .reverc file can
  1005. X!      superceed them - Rich.]
  1006. X! 
  1007. X! 11/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1008. X!     Supply a way of forcing the computer to move before its search is complete.
  1009. X!     This would be very handy at the higher levels.
  1010. X! 
  1011. X! 12/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1012. X!     Allow the player to go forwards through a game as well as backwards (Undo
  1013. X!     only performs the latter and not the former). In other words, "undo the
  1014. X!     Undo" !
  1015. X! 
  1016. X! 13/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1017. X!     As the computer is making it's move, highlight the best square found so
  1018. X!     far during the computer search and display its rating in the Notes section.
  1019. X! 
  1020. X! 14/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1021. X!     What about a 'Play Next Best' option? This would undo the last computer
  1022. X!     move and play the second best move found rather than the best one. If
  1023. X!     selected again, there would be another undo and the third best move would
  1024. X!     be made instead and so on, until the move list is exhausted. It's great
  1025. X!     for trying out different moves in the same position.
  1026. X! 
  1027. X! 15/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1028. X!     Countdown clocks for blitz games (first to hit 00:00:00 loses if the game
  1029. X!     is still in progress).
  1030. X! 
  1031. X! 16/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1032. X!     Board editing.
  1033. X! 
  1034. X! 17/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1035. X!     A display of the full tree for the best move rather than just the best
  1036. X!     move itself.
  1037. X! 
  1038. X! 18/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1039. X!     A resign feature if the search shows a completely lost endgame.
  1040. X! 
  1041. X! 19/ From Richard K. Lloyd <RKL@anduin.compsci.liverpool.ac.uk>
  1042. X!     A 'I will win/lose in x moves' announcement if a forced win/loss is
  1043. X!     detected.
  1044. X
  1045. X------- boardstuff.c -------
  1046. X*** /tmp/da28701    Fri Nov  9 10:25:30 1990
  1047. X--- boardstuff.c    Fri Nov  9 08:57:42 1990
  1048. X***************
  1049. X*** 7,17 ****
  1050. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  1051. X   *  All rights reserved.
  1052. X   *
  1053. X!  *  Permission is given to distribute these sources, as long as the
  1054. X!  *  introductory messages are not removed, and no monies are exchanged.
  1055. X   *
  1056. X!  *  You are forbidden from using Reve as is, or in a modified state, in
  1057. X!  *  any tournaments, without the permission of the authors.
  1058. X   *
  1059. X   *  No responsibility is taken for any errors on inaccuracies inherent
  1060. X   *  either to the comments or the code of this program, but if reported
  1061. X--- 7,22 ----
  1062. X   *  Copyright (C) 1990 - Rich Burridge & Yves Gallot.
  1063. X   *  All rights reserved.
  1064. X   *
  1065. X!  *  Permission is granted to copy this source, for redistribution
  1066. X!  *  in source form only, provided the news headers in "substantially
  1067. X!  *  unaltered format" are retained, the introductory messages are not
  1068. X!  *  removed, and no monies are exchanged.
  1069. X   *
  1070. X!  *  Permission is also granted to copy this source, without the
  1071. X!  *  news headers, for the purposes of making an executable copy by
  1072. X!  *  means of compilation, provided that such copy will not be used
  1073. X!  *  for the purposes of competition in any othello tournaments, without
  1074. X!  *  prior permission from the authors.
  1075. X   *
  1076. X   *  No responsibility is taken for any errors on inaccuracies inherent
  1077. X   *  either to the comments or the code of this program, but if reported
  1078. X***************
  1079. X*** 18,35 ****
  1080. X   *  (see README file), then an attempt will be made to fix them.
  1081. X   */
  1082. X  
  1083. X! #include <stdio.h>
  1084. X  #include <ctype.h>
  1085. X- 
  1086. X- #ifndef SYSV
  1087. X  #include <sys/time.h>
  1088. X- #endif /*SYSV*/
  1089. X  
  1090. X! #include "color.h"
  1091. X! #include "reve.h"
  1092. X! #include "extern.h"
  1093. X  
  1094. X- 
  1095. X  void
  1096. X  animate_move(move)
  1097. X  int move ;
  1098. X--- 23,38 ----
  1099. X   *  (see README file), then an attempt will be made to fix them.
  1100. X   */
  1101. X  
  1102. X! #include "reve.h"
  1103. X! #include "color.h"
  1104. X! #include "extern.h"
  1105. X  #include <ctype.h>
  1106. X  #include <sys/time.h>
  1107. X  
  1108. X! #ifdef X11
  1109. X! #include <X11/Xos.h>
  1110. X! #endif /*X11*/
  1111. X  
  1112. X  void
  1113. X  animate_move(move)
  1114. X  int move ;
  1115. X***************
  1116. X*** 50,56 ****
  1117. X          {
  1118. X  #ifndef SYSV
  1119. X            set_timer() ;
  1120. X! #endif /*SYSV*/
  1121. X            x0 = x ;
  1122. X            y0 = y ;
  1123. X            x += move_delta ;
  1124. X--- 53,59 ----
  1125. X          {
  1126. X  #ifndef SYSV
  1127. X            set_timer() ;
  1128. X! #endif /*!SYSV*/
  1129. X            x0 = x ;
  1130. X            y0 = y ;
  1131. X            x += move_delta ;
  1132. X***************
  1133. X*** 63,69 ****
  1134. X            draw_piece(WHITE, x0, CY+y0, RINV) ;
  1135. X  #ifndef SYSV
  1136. X            nap_upto(1) ;
  1137. X! #endif /*SYSV*/
  1138. X          }
  1139. X        draw_piece(WHITE, x, CY+y, RINV) ;
  1140. X      }
  1141. X--- 66,72 ----
  1142. X            draw_piece(WHITE, x0, CY+y0, RINV) ;
  1143. X  #ifndef SYSV
  1144. X            nap_upto(1) ;
  1145. X! #endif /*!SYSV*/
  1146. X          }
  1147. X        draw_piece(WHITE, x, CY+y, RINV) ;
  1148. X      }
  1149. X***************
  1150. X*** 77,83 ****
  1151. X          {
  1152. X  #ifndef SYSV
  1153. X            set_timer() ;
  1154. X! #endif /*SYSV*/
  1155. X            x0 = x ;
  1156. X            y0 = y ;
  1157. X            y += move_delta ;
  1158. X--- 80,86 ----
  1159. X          {
  1160. X  #ifndef SYSV
  1161. X            set_timer() ;
  1162. X! #endif /*!SYSV*/
  1163. X            x0 = x ;
  1164. X            y0 = y ;
  1165. X            y += move_delta ;
  1166. X***************
  1167. X*** 90,96 ****
  1168. X            draw_piece(WHITE, x0, CY+y0, RINV) ;
  1169. X  #ifndef SYSV
  1170. X            nap_upto(1) ;
  1171. X! #endif /*SYSV*/
  1172. X          }
  1173. X        draw_piece(WHITE, x, CY+y, RINV) ;
  1174. X      }
  1175. X--- 93,99 ----
  1176. X            draw_piece(WHITE, x0, CY+y0, RINV) ;
  1177. X  #ifndef SYSV
  1178. X            nap_upto(1) ;
  1179. X! #endif /*!SYSV*/
  1180. X          }
  1181. X        draw_piece(WHITE, x, CY+y, RINV) ;
  1182. X      }
  1183. X***************
  1184. X*** 112,118 ****
  1185. X        who_wins() ;
  1186. X        last_cmode = cmode ;     /* Save previous value in case of undo. */
  1187. X        cmode = GAME_OVER ;
  1188. X!       message(PANEL_MES, "Game over") ;
  1189. X        return(FALSE) ;
  1190. X      }
  1191. X    if ((move = valid_move(&board, player)) == FALSE)
  1192. X--- 115,121 ----
  1193. X        who_wins() ;
  1194. X        last_cmode = cmode ;     /* Save previous value in case of undo. */
  1195. X        cmode = GAME_OVER ;
  1196. X!       message(PANEL_MES, "***GAME OVER***") ;
  1197. X        return(FALSE) ;
  1198. X      }
  1199. X    if ((move = valid_move(&board, player)) == FALSE)
  1200. X***************
  1201. X*** 126,132 ****
  1202. X            who_wins() ;
  1203. X            last_cmode = cmode ;
  1204. X            cmode = GAME_OVER ;
  1205. X!           message(PANEL_MES, "Game over") ;
  1206. X          }
  1207. X        return(FALSE) ;
  1208. X      }
  1209. X--- 129,135 ----
  1210. X            who_wins() ;
  1211. X            last_cmode = cmode ;
  1212. X            cmode = GAME_OVER ;
  1213. X!           message(PANEL_MES, "***GAME OVER***") ;
  1214. X          }
  1215. X        return(FALSE) ;
  1216. X      }
  1217. X***************
  1218. X*** 148,153 ****
  1219. X--- 151,157 ----
  1220. X      else
  1221. X        { 
  1222. X          if (cmode != GAME_OVER) cmode = (enum cantype) ((int) cmode - 1) ;
  1223. X+         next_player = OPPONENT(next_player) ;
  1224. X          return ;
  1225. X        }
  1226. X  }
  1227. X***************
  1228. X*** 180,185 ****
  1229. X--- 184,216 ----
  1230. X  }
  1231. X  
  1232. X  
  1233. X+ void
  1234. X+ draw_piece(piece, x, y, op)    /* Draw an othello piece on the board. */
  1235. X+ int piece, x, y ;
  1236. X+ enum optype op ;
  1237. X+ {
  1238. X+   switch (piece)
  1239. X+     {
  1240. X+       case BLACK : draw_stencil(x, y, PSIZE, PSIZE, op, C_BLACK,
  1241. X+                                 P_BLACK, P_BLACK) ;
  1242. X+                    break ;
  1243. X+       case WHITE : draw_stencil(x, y, PSIZE, PSIZE, op, C_BLACK,
  1244. X+                                 P_BLACK, P_WHITE) ;
  1245. X+     }
  1246. X+ }
  1247. X+    
  1248. X+  
  1249. X+ void
  1250. X+ draw_rect(x1, y1, x2, y2, op, color)
  1251. X+ int x1, y1, x2, y2, op, color ;
  1252. X+ {
  1253. X+   draw_line(x1, y1, x2, y1, op, color) ;
  1254. X+   draw_line(x1, y1, x1, y2, op, color) ;
  1255. X+   draw_line(x2, y1, x2, y2, op, color) ;
  1256. X+   draw_line(x1, y2, x2, y2, op, color) ;
  1257. X+ }
  1258. X+ 
  1259. X+ 
  1260. X  formfliplist(move, player)
  1261. X  int move, player ;
  1262. X  {        
  1263. X***************
  1264. X*** 196,201 ****
  1265. X--- 227,233 ----
  1266. X    moves[n].move = move ;
  1267. X    moves[n].note = note ;
  1268. X    moves[n].player = player ;
  1269. X+   moves[n].timeleft = timeleft ;
  1270. X  
  1271. X    cnt = count(&board, player) ;
  1272. X    return(cnt - old_cnt - 1) ;
  1273. X***************
  1274. X*** 263,269 ****
  1275. X    initboard() ;
  1276. X    last_move = -1 ;
  1277. X    init_canvas() ;
  1278. X!   message(NOTES_MES, "") ;
  1279. X    while (fgets(buf, MAXLINE, fp) != NULL)
  1280. X      {
  1281. X        if (buf[0] == '\n' || buf[0] == '#') continue ;
  1282. X--- 295,301 ----
  1283. X    initboard() ;
  1284. X    last_move = -1 ;
  1285. X    init_canvas() ;
  1286. X!   message(EVAL_MES, "") ;
  1287. X    while (fgets(buf, MAXLINE, fp) != NULL)
  1288. X      {
  1289. X        if (buf[0] == '\n' || buf[0] == '#') continue ;
  1290. X***************
  1291. X*** 286,292 ****
  1292. X        if (lptr < mptr) next_player = BLACK ;    /* Black move? */
  1293. X        else             next_player = WHITE ;
  1294. X        SSCANF(lptr, "<%c-%c>", &row, &col) ;
  1295. X!       if (load_move(moveno, row, col) == 0)
  1296. X          {
  1297. X            SPRINTF(buf, "Load error: invalid move <%c-%c> on line %d",
  1298. X                                      row, col, move) ;
  1299. X--- 318,324 ----
  1300. X        if (lptr < mptr) next_player = BLACK ;    /* Black move? */
  1301. X        else             next_player = WHITE ;
  1302. X        SSCANF(lptr, "<%c-%c>", &row, &col) ;
  1303. X!       if (load_move(row, col) == 0)
  1304. X          {
  1305. X            SPRINTF(buf, "Load error: invalid move <%c-%c> on line %d",
  1306. X                                      row, col, move) ;
  1307. X***************
  1308. X*** 309,318 ****
  1309. X  }
  1310. X  
  1311. X  
  1312. X! load_move(n, col, row)
  1313. X! int n, col, row ;
  1314. X  {
  1315. X!   int i, taken, x, y ;
  1316. X  
  1317. X    if (row < '1' || row > '8') return(0) ;
  1318. X    if (isupper(col)) col = tolower(col) ;
  1319. X--- 341,350 ----
  1320. X  }
  1321. X  
  1322. X  
  1323. X! load_move(col, row)
  1324. X! int col, row ;
  1325. X  {
  1326. X!   int i, x, y ;
  1327. X  
  1328. X    if (row < '1' || row > '8') return(0) ;
  1329. X    if (isupper(col)) col = tolower(col) ;
  1330. X***************
  1331. X*** 319,325 ****
  1332. X    if (col < 'a' || col > 'h') return(0) ;
  1333. X    move = (row - '1') * BOARD_SIZE + (col - 'a') ;
  1334. X    if (legal(move, next_player, &board) == FALSE) return(0) ;
  1335. X!   taken = formfliplist(move, next_player) ;
  1336. X    batch(IS_ON) ;
  1337. X    FOR_BOARD(i)
  1338. X      if (board.square[i] != old_board.square[i])
  1339. X--- 351,357 ----
  1340. X    if (col < 'a' || col > 'h') return(0) ;
  1341. X    move = (row - '1') * BOARD_SIZE + (col - 'a') ;
  1342. X    if (legal(move, next_player, &board) == FALSE) return(0) ;
  1343. X!   (void) formfliplist(move, next_player) ;
  1344. X    batch(IS_ON) ;
  1345. X    FOR_BOARD(i)
  1346. X      if (board.square[i] != old_board.square[i])
  1347. X***************
  1348. X*** 347,353 ****
  1349. X    if (elapsed > n) return ;
  1350. X    usleep((unsigned) (n - elapsed)) ;
  1351. X  }
  1352. X! #endif /*SYSV*/
  1353. X  
  1354. X  
  1355. X  void
  1356. X--- 379,385 ----
  1357. X    if (elapsed > n) return ;
  1358. X    usleep((unsigned) (n - elapsed)) ;
  1359. X  }
  1360. X! #endif /*!SYSV*/
  1361. X  
  1362. X  
  1363. X  void
  1364. X***************
  1365. X*** 399,405 ****
  1366. X  void
  1367. X  set_score()
  1368. X  {
  1369. X!   SPRINTF(line, "Black: %2d, White: %2d",
  1370. X                   count(&board, BLACK), count(&board, WHITE)) ;
  1371. X    message(SCORE_MES, line) ;
  1372. X  }
  1373. X--- 431,437 ----
  1374. X  void
  1375. X  set_score()
  1376. X  {
  1377. X!   SPRINTF(line, "Stones: Black: %2d  White: %2d",
  1378. X                   count(&board, BLACK), count(&board, WHITE)) ;
  1379. X    message(SCORE_MES, line) ;
  1380. X  }
  1381. X***************
  1382. X*** 422,431 ****
  1383. X  
  1384. X    GETTIMEOFDAY(&tp, &tzp) ;
  1385. X  }
  1386. X! #endif /*SYSV*/
  1387. X  
  1388. X  
  1389. X  void
  1390. X  show_suggestion()
  1391. X  {
  1392. X    enum optype rop ;
  1393. X--- 454,528 ----
  1394. X  
  1395. X    GETTIMEOFDAY(&tp, &tzp) ;
  1396. X  }
  1397. X! #endif /*!SYSV*/
  1398. X  
  1399. X  
  1400. X  void
  1401. X+ show_all(state)
  1402. X+ enum bltype state ;
  1403. X+ {
  1404. X+   int color, d, i, x, y ;
  1405. X+ 
  1406. X+   d = (int) cur_dpyno ;
  1407. X+   batch(IS_ON) ;
  1408. X+   if (state == IS_ON)
  1409. X+     {
  1410. X+       FOR_BOARD(i) s_all.square[i] = FREE ;
  1411. X+       FOR_BOARD(i)
  1412. X+         if (board.square[i] == FREE && legal(i, next_player, &board))
  1413. X+           {
  1414. X+             s_all.square[i] = next_player ;
  1415. X+             if (iscolor[d])
  1416. X+               {
  1417. X+                 get_xy(i, &x, &y) ;
  1418. X+                 draw_stencil(x, CY+y, PSIZE, PSIZE, RSRC, C_BLACK,
  1419. X+                              P_WHITE, P_WHITE) ;
  1420. X+               }
  1421. X+             else
  1422. X+               {
  1423. X+                 x = BBORDER + ((i & 7)  + 1) * CELL_SIZE - CELL_SIZE / 2 ;
  1424. X+                 y = BBORDER + ((i >> 3) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
  1425. X+                 draw_line(x-5, CY+y,   x+5, CY+y,   RSRC, C_BLACK) ;
  1426. X+                 draw_line(x,   CY+y+5, x,   CY+y-5, RSRC, C_BLACK) ;
  1427. X+               }
  1428. X+           }
  1429. X+     }
  1430. X+   else
  1431. X+     {
  1432. X+       FOR_BOARD(i)
  1433. X+         if (s_all.square[i] != FREE)
  1434. X+           {
  1435. X+             s_all.square[i] = FREE ;
  1436. X+             x = (i & 7)  * CELL_SIZE + BBORDER + 1 ;
  1437. X+             y = (i >> 3) * CELL_SIZE + BBORDER + 1 ;  
  1438. X+             color = (iscolor[d]) ? C_LBROWN : C_WHITE ;
  1439. X+             color_area(x, CY + y, CELL_SIZE - 2, CELL_SIZE - 2, color) ;
  1440. X+           }
  1441. X+     }    
  1442. X+   batch(IS_OFF) ;
  1443. X+   show_moves = (int) state ;
  1444. X+ }
  1445. X+ 
  1446. X+ 
  1447. X+ void
  1448. X+ show_last(move, state)
  1449. X+ int move ;
  1450. X+ enum bltype state ;
  1451. X+ {
  1452. X+   int color, x, y ;
  1453. X+ 
  1454. X+   if (move == -1) return ;
  1455. X+   if (iscolor[(int) cur_dpyno]) color = (state == IS_ON) ? C_BLACK : C_LBROWN ;
  1456. X+   else                          color = (state == IS_ON) ? C_BLACK : C_WHITE ;
  1457. X+ 
  1458. X+   x = (move & 7)  * CELL_SIZE + BBORDER ;
  1459. X+   y = (move >> 3) * CELL_SIZE + BBORDER ;
  1460. X+   draw_rect(x + 2,             CY + y + 2,
  1461. X+             x + CELL_SIZE - 2, CY + y + CELL_SIZE - 2, RSRC, color) ;
  1462. X+ }
  1463. X+ 
  1464. X+ 
  1465. X+ void
  1466. X  show_suggestion()
  1467. X  {
  1468. X    enum optype rop ;
  1469. X***************
  1470. X*** 450,455 ****
  1471. X--- 547,554 ----
  1472. X  {
  1473. X    int flips, i, piece, x, y ;
  1474. X   
  1475. X+   show_all(IS_OFF) ;
  1476. X+   show_last(last_move, IS_OFF) ;
  1477. X    show_suggestion() ;
  1478. X    for (flips = 0; flips < 4; flips++)
  1479. X      {
  1480. X***************
  1481. X*** 468,473 ****
  1482. X--- 567,574 ----
  1483. X        batch(IS_OFF) ;
  1484. X        PAUSE ;
  1485. X      }
  1486. X+   show_last(move, IS_ON) ;
  1487. X+   last_move = move ;
  1488. X    set_score() ;
  1489. X    set_turn(OPPONENT(player)) ;
  1490. X    message(TURN_MES, line) ;
  1491. X***************
  1492. X*** 475,484 ****
  1493. X      if ((player == BLACK && items[(int) BLACK_PLAYS].value == COMPUTER) ||
  1494. X          (player == WHITE && items[(int) WHITE_PLAYS].value == COMPUTER))
  1495. X        {
  1496. X!         SPRINTF(line, "%s: <%c-%c> note : %ld",
  1497. X                  (player == BLACK) ? "Black" : "White",
  1498. X                  (move & 7) + 'a', (move >> 3) + '1', note) ;
  1499. X!         message(NOTES_MES, line) ;
  1500. X        }
  1501. X  }
  1502. X  
  1503. X--- 576,585 ----
  1504. X      if ((player == BLACK && items[(int) BLACK_PLAYS].value == COMPUTER) ||
  1505. X          (player == WHITE && items[(int) WHITE_PLAYS].value == COMPUTER))
  1506. X        {
  1507. X!         SPRINTF(line, "%s: <%c-%c> eval : %ld",
  1508. X                  (player == BLACK) ? "Black" : "White",
  1509. X                  (move & 7) + 'a', (move >> 3) + '1', note) ;
  1510. X!         message(EVAL_MES, line) ;
  1511. X        }
  1512. X  }
  1513. X  
  1514. X
  1515. X
  1516. END_OF_FILE
  1517. if test 43501 -ne `wc -c <'patches01a'`; then
  1518.     echo shar: \"'patches01a'\" unpacked with wrong size!
  1519. fi
  1520. # end of 'patches01a'
  1521. fi
  1522. echo shar: End of archive 1 \(of 4\).
  1523. cp /dev/null ark1isdone
  1524. MISSING=""
  1525. for I in 1 2 3 4 ; do
  1526.     if test ! -f ark${I}isdone ; then
  1527.     MISSING="${MISSING} ${I}"
  1528.     fi
  1529. done
  1530. if test "${MISSING}" = "" ; then
  1531.     echo You have unpacked all 4 archives.
  1532.     rm -f ark[1-9]isdone
  1533. else
  1534.     echo You still need to unpack the following archives:
  1535.     echo "        " ${MISSING}
  1536. fi
  1537. ##  End of shell archive.
  1538. exit 0
  1539.