billr@saab.CNA.TEK.COM (Bill Randle) (11/17/90)
Submitted-by: Rich Burridge <rburridge@sun.COM>
Posting-number: Volume 11, Issue 62
Archive-name: reve/Patch1b
Patch-To: reve: Volume 11, Issue 52-58
Environment: SunView, XView, X11R4, termcap
#! /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 2 (of 4)."
# Contents: patches01b
# Wrapped by billr@saab on Fri Nov 16 10:46:43 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches01b' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'patches01b'\"
else
echo shar: Extracting \"'patches01b'\" \(51889 characters\)
sed "s/^X//" >'patches01b' <<'END_OF_FILE'
X
X------- color.h -------
X*** /tmp/da28728 Fri Nov 9 10:28:40 1990
X--- color.h Mon Nov 5 09:10:15 1990
X***************
X*** 6,16 ****
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is given to distribute these sources, as long as the
X! * introductory messages are not removed, and no monies are exchanged.
X *
X! * You are forbidden from using Reve as is, or in a modified state, in
X! * any tournaments, without the permission of the authors.
X *
X * No responsibility is taken for any errors or inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X--- 6,21 ----
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is granted to copy this source, for redistribution
X! * in source form only, provided the news headers in "substantially
X! * unaltered format" are retained, the introductory messages are not
X! * removed, and no monies are exchanged.
X *
X! * Permission is also granted to copy this source, without the
X! * news headers, for the purposes of making an executable copy by
X! * means of compilation, provided that such copy will not be used
X! * for the purposes of competition in any othello tournaments, without
X! * prior permission from the authors.
X *
X * No responsibility is taken for any errors or inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X
X------- events.c -------
X*** /tmp/da28731 Fri Nov 9 10:28:41 1990
X--- events.c Wed Nov 7 21:09:27 1990
X***************
X*** 7,17 ****
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is given to distribute these sources, as long as the
X! * introductory messages are not removed, and no monies are exchanged.
X *
X! * You are forbidden from using Reve as is, or in a modified state, in
X! * any tournaments, without the permission of the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X--- 7,22 ----
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is granted to copy this source, for redistribution
X! * in source form only, provided the news headers in "substantially
X! * unaltered format" are retained, the introductory messages are not
X! * removed, and no monies are exchanged.
X *
X! * Permission is also granted to copy this source, without the
X! * news headers, for the purposes of making an executable copy by
X! * means of compilation, provided that such copy will not be used
X! * for the purposes of competition in any othello tournaments, without
X! * prior permission from the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X***************
X*** 18,24 ****
X * (see README file), then an attempt will be made to fix them.
X */
X
X- #include <stdio.h>
X #include "reve.h"
X #include "color.h"
X #include "extern.h"
X--- 23,28 ----
X***************
X*** 166,172 ****
X switch (item)
X {
X case BLACK_PLAYS :
X! WHITE_PLAYS : if (item == BLACK_PLAYS) curx = 0 ;
X else curx = BBORDER + (3*(BWIDTH+BGAP)) ;
X switch (ch)
X {
X--- 170,176 ----
X switch (item)
X {
X case BLACK_PLAYS :
X! case WHITE_PLAYS : if (item == BLACK_PLAYS) curx = 0 ;
X else curx = BBORDER + (3*(BWIDTH+BGAP)) ;
X switch (ch)
X {
X***************
X*** 247,254 ****
X nextc == RIGHT_DOWN)
X {
X set_cursor(NOCURSOR) ;
X! piece_x = curx - BBORDER - (PIECE_RAD) ;
X! piece_y = cury - BBORDER - (PIECE_RAD) ;
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X cmode = (enum cantype) ((int) cmode + 1) ;
X }
X--- 251,258 ----
X nextc == RIGHT_DOWN)
X {
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***************
X*** 319,325 ****
X case 'W' : do_cycle_key(WHITE_PLAYS, nextc) ;
X break ;
X
X! case 'l' : last() ; /* Button items. */
X break ;
X case 'L' : curx = 0 ;
X draw_textfield() ;
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
X------- extern.h -------
X*** /tmp/da28734 Fri Nov 9 10:28:42 1990
X--- extern.h Wed Nov 7 14:57:04 1990
X***************
X*** 6,16 ****
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is given to distribute these sources, as long as the
X! * introductory messages are not removed, and no monies are exchanged.
X *
X! * You are forbidden from using Reve as is, or in a modified state, in
X! * any tournaments, without the permission of the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X--- 6,21 ----
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is granted to copy this source, for redistribution
X! * in source form only, provided the news headers in "substantially
X! * unaltered format" are retained, the introductory messages are not
X! * removed, and no monies are exchanged.
X *
X! * Permission is also granted to copy this source, without the
X! * news headers, for the purposes of making an executable copy by
X! * means of compilation, provided that such copy will not be used
X! * for the purposes of competition in any othello tournaments, without
X! * prior permission from the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X***************
X*** 23,29 ****
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 depth ; /* Depth of search for computers move. */
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--- 28,33 ----
X***************
X*** 34,41 ****
X--- 38,47 ----
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 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+ extern int monochrome ; /* If set, display will be in monochrome. */
X extern int move ; /* Current move being evaluated. */
X extern int move_delta ; /* Delta for piece animation. */
X extern int nextc ; /* Current event identifier. */
X***************
X*** 51,56 ****
X--- 57,63 ----
X extern int s_player ;
X extern int s_row ;
X extern int s_col ;
X+ extern int show_moves ; /* If set, all possible moves are being shown. */
X extern int show_notes ; /* If set, display notes value from play_reve. */
X extern int suggestion ; /* Positive if a suggested move. */
X extern int suggest_x ; /* X position of suggested move. */
X***************
X*** 62,67 ****
X--- 69,75 ----
X extern int wx ; /* Initial X position of the window. */
X extern int wy ; /* Initial Y position of the window. */
X
X+ extern time_t timeleft ; /* Amount of time left for computer moves. */
X extern long note ; /* Note value for current computer move. */
X
X extern char *diff_values[] ; /* Values for cyclic difficulty button. */
X***************
X*** 74,81 ****
X extern char progname[] ; /* The name of this program. */
X extern char revtable[] ; /* Table for reversing bits in a byte. */
X
X! extern char black_dpy[] ; /* Black piece display information. */
X! extern char white_dpy[] ; /* White piece display information. */
X
X extern FILE *rem_fp ;
X extern struct timeval tp ; /* Used by the nap_upto routine. */
X--- 82,89 ----
X extern char progname[] ; /* The name of this program. */
X extern char revtable[] ; /* Table for reversing bits in a byte. */
X
X! extern char *black_dpy ; /* Black piece display information. */
X! extern char *white_dpy ; /* White piece display information. */
X
X extern FILE *rem_fp ;
X extern struct timeval tp ; /* Used by the nap_upto routine. */
X***************
X*** 85,90 ****
X--- 93,99 ----
X extern BOARD board ; /* The current reve board. */
X extern BOARD old_board ; /* The previous reve board. */
X extern BOARD *s_pos ;
X+ extern BOARD s_all ; /* List of valid positions for this move. */
X extern BOARD moves[64] ; /* Complete array of board moves. */
X
X extern enum cantype cmode, last_cmode ;
X
X------- images.h -------
X*** /tmp/da28737 Fri Nov 9 10:28:42 1990
X--- images.h Tue Nov 6 18:21:08 1990
X***************
X*** 6,16 ****
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is given to distribute these sources, as long as the
X! * introductory messages are not removed, and no monies are exchanged.
X *
X! * You are forbidden from using Reve as is, or in a modified state, in
X! * any tournaments, without the permission of the authors.
X *
X * No responsibility is taken for any errors or inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X--- 6,21 ----
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is granted to copy this source, for redistribution
X! * in source form only, provided the news headers in "substantially
X! * unaltered format" are retained, the introductory messages are not
X! * removed, and no monies are exchanged.
X *
X! * Permission is also granted to copy this source, without the
X! * news headers, for the purposes of making an executable copy by
X! * means of compilation, provided that such copy will not be used
X! * for the purposes of competition in any othello tournaments, without
X! * prior permission from the authors.
X *
X * No responsibility is taken for any errors or inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X***************
X*** 18,48 ****
X */
X
X unsigned short button_stencil_image[] = {
X! #include "images/button.stencil.icon"
X } ;
X
X unsigned short button_invert_image[] = {
X! #include "images/button.invert.icon"
X } ;
X
X unsigned short button_normal_image[] = {
X! #include "images/button.normal.icon"
X } ;
X
X unsigned short cycle_glyph_image[] = {
X! #include "images/cycle.glyph.icon"
X } ;
X
X unsigned short cycle_stencil_image[] = {
X! #include "images/cycle.stencil.icon"
X } ;
X
X unsigned short cycle_linvert_image[] = {
X! #include "images/cycle.linvert.icon"
X } ;
X
X unsigned short cycle_rinvert_image[] = {
X! #include "images/cycle.rinvert.icon"
X } ;
X
X unsigned short icon_image[] = {
X--- 23,53 ----
X */
X
X unsigned short button_stencil_image[] = {
X! #include "images/Sbutton.icon"
X } ;
X
X unsigned short button_invert_image[] = {
X! #include "images/Ibutton.icon"
X } ;
X
X unsigned short button_normal_image[] = {
X! #include "images/Nbutton.icon"
X } ;
X
X unsigned short cycle_glyph_image[] = {
X! #include "images/Ncycle.icon"
X } ;
X
X unsigned short cycle_stencil_image[] = {
X! #include "images/Scycle.icon"
X } ;
X
X unsigned short cycle_linvert_image[] = {
X! #include "images/Lcycle.icon"
X } ;
X
X unsigned short cycle_rinvert_image[] = {
X! #include "images/Rcycle.icon"
X } ;
X
X unsigned short icon_image[] = {
X***************
X*** 50,56 ****
X } ;
X
X unsigned short cicon_image[] = {
X! #include "images/reve.color.icon"
X } ;
X
X unsigned short hglass_image[] = {
X--- 55,61 ----
X } ;
X
X unsigned short cicon_image[] = {
X! #include "images/Creve.icon"
X } ;
X
X unsigned short hglass_image[] = {
X
X------- items.c -------
X*** /tmp/da28740 Fri Nov 9 10:28:43 1990
X--- items.c Mon Nov 5 09:05:39 1990
X***************
X*** 7,17 ****
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is given to distribute these sources, as long as the
X! * introductory messages are not removed, and no monies are exchanged.
X *
X! * You are forbidden from using Reve as is, or in a modified state, in
X! * any tournaments, without the permission of the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X--- 7,22 ----
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is granted to copy this source, for redistribution
X! * in source form only, provided the news headers in "substantially
X! * unaltered format" are retained, the introductory messages are not
X! * removed, and no monies are exchanged.
X *
X! * Permission is also granted to copy this source, without the
X! * news headers, for the purposes of making an executable copy by
X! * means of compilation, provided that such copy will not be used
X! * for the purposes of competition in any othello tournaments, without
X! * prior permission from the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X***************
X*** 18,30 ****
X * (see README file), then an attempt will be made to fix them.
X */
X
X- #include <stdio.h>
X- #include <strings.h>
X- #include "color.h"
X #include "reve.h"
X #include "extern.h"
X
X
X void
X draw_button(item, color, image) /* Draw a panel button. */
X enum panel_type item ;
X--- 23,39 ----
X * (see README file), then an attempt will be made to fix them.
X */
X
X #include "reve.h"
X+ #include "color.h"
X #include "extern.h"
X
X+ #ifdef SYSV
X+ #include "string.h"
X+ #else
X+ #include <strings.h>
X+ #endif /*SYSV*/
X
X+
X void
X draw_button(item, color, image) /* Draw a panel button. */
X enum panel_type item ;
X***************
X*** 107,139 ****
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- switch (piece)
X- {
X- case BLACK : draw_stencil(x, y, PSIZE, PSIZE, op, C_BLACK,
X- P_BLACK, P_BLACK) ;
X- break ;
X- case WHITE : draw_stencil(x, y, PSIZE, PSIZE, op, C_BLACK,
X- P_BLACK, P_WHITE) ;
X- }
X- }
X-
X-
X- void
X- draw_rect(x1, y1, x2, y2)
X- int x1, y1, x2, y2 ;
X- {
X- draw_line(x1, y1, x2, y1, RSRC, C_BLACK) ;
X- draw_line(x1, y1, x1, y2, RSRC, C_BLACK) ;
X- draw_line(x2, y1, x2, y2, RSRC, C_BLACK) ;
X- draw_line(x1, y2, x2, y2, RSRC, C_BLACK) ;
X- }
X-
X-
X- void
X draw_textfield()
X {
X int x1, y1 ;
X--- 116,121 ----
X***************
X*** 142,148 ****
X x1 = BBORDER + BWIDTH + (BGAP / 2) ;
X y1 = BBORDER + BHEIGHT + (BGAP / 2) ;
X color_area(x1, y1, 4 * (BWIDTH + BGAP), BHEIGHT + BGAP, C_WHITE) ;
X! draw_rect(x1, y1, x1 + (4 * (BWIDTH + BGAP)) - 1, y1 + BHEIGHT + BGAP - 1) ;
X draw_text(BBORDER + BWIDTH + BGAP, BBORDER + BHEIGHT + BGAP +
X (nfont_height + (BHEIGHT - nfont_height) / 2) - 5,
X BFONT, C_BLACK, "File:") ;
X--- 124,131 ----
X x1 = BBORDER + BWIDTH + (BGAP / 2) ;
X y1 = BBORDER + BHEIGHT + (BGAP / 2) ;
X color_area(x1, y1, 4 * (BWIDTH + BGAP), BHEIGHT + BGAP, C_WHITE) ;
X! draw_rect(x1, y1, x1 + (4 * (BWIDTH + BGAP)) - 1,
X! y1 + BHEIGHT + BGAP - 1, RSRC, C_BLACK) ;
X draw_text(BBORDER + BWIDTH + BGAP, BBORDER + BHEIGHT + BGAP +
X (nfont_height + (BHEIGHT - nfont_height) / 2) - 5,
X BFONT, C_BLACK, "File:") ;
X***************
X*** 210,219 ****
X void
X make_panel()
X {
X- draw_button(LAST_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(LOAD_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(NEW_GAME_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(SAVE_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(SUGGEST_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(UNDO_BUT, C_LGREY, BUT_NORMAL) ;
X
X--- 193,202 ----
X void
X make_panel()
X {
X draw_button(LOAD_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(NEW_GAME_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(SAVE_BUT, C_LGREY, BUT_NORMAL) ;
X+ draw_button(SHOW_ALL_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(SUGGEST_BUT, C_LGREY, BUT_NORMAL) ;
X draw_button(UNDO_BUT, C_LGREY, BUT_NORMAL) ;
X
X***************
X*** 226,232 ****
X draw_cycle_item(NOTES, notes_values, C_LGREY, CY_NORMAL) ;
X
X make_message(PANEL_MES) ;
X! make_message(NOTES_MES) ;
X make_message(SCORE_MES) ;
X make_message(TURN_MES) ;
X }
X--- 209,215 ----
X draw_cycle_item(NOTES, notes_values, C_LGREY, CY_NORMAL) ;
X
X make_message(PANEL_MES) ;
X! make_message(EVAL_MES) ;
X make_message(SCORE_MES) ;
X make_message(TURN_MES) ;
X }
X
X------- reve.man -------
X*** /tmp/da28765 Fri Nov 9 10:32:20 1990
X--- reve.man Fri Nov 9 10:31:20 1990
X***************
X*** 10,17 ****
X
X SYNOPSIS
X reve [ -b [ display ] ] [ -c ] [ -d difficulty ] [ -e edge-
X! file ] [ -g geometry ] [ -i ] [ -l gamefile ] [ -n ] [ -v ]
X! [ -w [ display ] ] [ -? ] [ -Wi ] [ -Wp x y ] [ -WP x y ]
X
X DESCRIPTION
X Reve is a version of the popular Othello game. It contains
X--- 10,18 ----
X
X SYNOPSIS
X reve [ -b [ display ] ] [ -c ] [ -d difficulty ] [ -e edge-
X! file ] [ -g geometry ] [ -i ] [ -l gamefile ] [ -m ] [ -n ]
X! [ -r ] [ -v ] [ -w [ display ] ] [ -? ] [ -Wi ] [ -Wp x y ]
X! [ -WP x y ]
X
X DESCRIPTION
X Reve is a version of the popular Othello game. It contains
X***************
X*** 38,44 ****
X go. Note that it is also possible to supply a number and a
X letter pair, to indicate where you would like your new piece
X to go. This is the only method to place pieces with the dumb
X! tty interface.
X
X There are various buttons and cyclic selections available.
X Their meanings are given below, plus an indication of their
X--- 39,47 ----
X go. Note that it is also possible to supply a number and a
X letter pair, to indicate where you would like your new piece
X to go. This is the only method to place pieces with the dumb
X! tty interface. The square containing the last move will be
X! shown with a black outline. This is updated with each new
X! move.
X
X There are various buttons and cyclic selections available.
X Their meanings are given below, plus an indication of their
X***************
X*** 54,62 ****
X other combination, then you should use the appropriate com-
X mand line options (see below).
X
X- REVE BUTTONS
X- With the graphics versions, there are eight buttons that are
X- normally displayed at the top of the Reve window. Each of
X
X
X
X--- 57,62 ----
X***************
X*** 71,81 ****
X
X
X
X these buttons, except the "done" button has a keyboard
X equivalent which is given in brackets below.
X
X- last [ l ] Show the last move played.
X-
X load [ L ] Load a game file. The format of this game
X file is given below. With the graphical
X versions, a text field is displayed
X--- 71,82 ----
X
X
X
X+ REVE BUTTONS
X+ With the graphics versions, there are eight buttons that are
X+ normally displayed at the top of the Reve window. Each of
X these buttons, except the "done" button has a keyboard
X equivalent which is given in brackets below.
X
X load [ L ] Load a game file. The format of this game
X file is given below. With the graphical
X versions, a text field is displayed
X***************
X*** 92,97 ****
X--- 93,102 ----
X game file, the piece is displayed on the
X board, and the appropriate pieces flipped.
X
X+ moves? [ A ] Show all the valid moves for the current
X+ board. This is useful for beginners, and
X+ for teaching purposes.
X+
X new game [ n ] Start a new game of reve
X
X save [ S ] Save the current game to file. See the
X***************
X*** 118,128 ****
X left mouse button, to increment or decrement the current
X selection (depending upon which half on the item you click
X over), or a selection can be made from a popup menu when you
X- click with the right mouse button (SunView and XView ver-
X- sions only). Each cycle value has a keyboard equivalent
X- which is given in brackets below. This must be followed by
X- the value of the new selection you wish to make. The dumb
X- tty version has the equivalent of these items displayed to
X
X
X
X--- 123,128 ----
X***************
X*** 137,142 ****
X--- 137,147 ----
X
X
X
X+ click with the right mouse button (SunView and XView ver-
X+ sions only). Each cycle value has a keyboard equivalent
X+ which is given in brackets below. This must be followed by
X+ the value of the new selection you wish to make. The dumb
X+ tty version has the equivalent of these items displayed to
X the right of the reve board display.
X
X Black: [ B ] Select whether the black player should be
X***************
X*** 184,197 ****
X of reve it is possible to give an optional display
X value.
X
X- -c The computer will play. Presence or absence of -b and
X- -w options determine which piece the computer plays.
X
X- -d difficulty
X- The level of difficulty for computer moves. See the
X
X
X-
X Sun Release 4.1 Last change: 18 October 1990 3
X
X
X--- 189,197 ----
X***************
X*** 203,212 ****
X
X
X
X Difficulty: cyclic item description above for more
X information.
X
X! -eedgefile
X Specify an alternate location for the reve edge stabil-
X ity table file. Normally the location of this file is
X compiled in when the program is created, but reve will
X--- 203,217 ----
X
X
X
X+ -c The computer will play. Presence or absence of -b and
X+ -w options determine which piece the computer plays.
X+
X+ -d difficulty
X+ The level of difficulty for computer moves. See the
X Difficulty: cyclic item description above for more
X information.
X
X! -e edgefile
X Specify an alternate location for the reve edge stabil-
X ity table file. Normally the location of this file is
X compiled in when the program is created, but reve will
X***************
X*** 226,233 ****
X--- 231,245 ----
X Load a game file. The format of this game file is given
X below. The board will be setup with these pieces.
X
X+ -m Always display in monochrome, even on a color screen.
X+
X -n Display computer notes.
X
X+ -r Save a log of computer move information to the file
X+ reve.res as the game progresses. This information is
X+ probably only useful to people trying to improve the
X+ computer algorithm.
X+
X -? Print the version number and usage message for this
X release of the reve program.
X
X***************
X*** 243,274 ****
X and XView version of reve will automatically uses this
X flag, but the X11 version will also.
X
X- -Wp x y
X- Start the open window position at x y
X
X- -WP x y
X- Start the icon position at x y
X
X- REVE GAMES FILE FORMAT
X- Reve has the ability to load or save games. The format of
X- the games files are:
X
X! 1, <C-4> - [ remarks field ]
X! 2, - <E-3> [ remarks field ]
X
X
X
X- Sun Release 4.1 Last change: 18 October 1990 4
X
X
X
X
X
X
X! REVE(6) GAMES AND DEMOS REVE(6)
X
X
X
X There is one move per line. Lines starting with a '#' and
X blank lines are ignored. The first field of each line is the
X move number. This will be present before the comma. It is
X--- 255,287 ----
X and XView version of reve will automatically uses this
X flag, but the X11 version will also.
X
X
X
X
X! Sun Release 4.1 Last change: 18 October 1990 4
X
X
X
X
X
X
X+ REVE(6) GAMES AND DEMOS REVE(6)
X
X
X
X! -Wp x y
X! Start the open window position at x y
X
X+ -WP x y
X+ Start the icon position at x y
X
X+ REVE GAMES FILE FORMAT
X+ Reve has the ability to load or save games. The format of
X+ the games files are:
X
X+ 1, <C-4> - [ remarks field ]
X+ 2, - <E-3> [ remarks field ]
X+
X There is one move per line. Lines starting with a '#' and
X blank lines are ignored. The first field of each line is the
X move number. This will be present before the comma. It is
X***************
X*** 297,315 ****
X AUTHORS
X Computer strategy: Yves Gallot galloty@cernvax.cern.ch
X Graphics interface: Rich Burridge richb@Aus.Sun.COM
X-
X-
X-
X-
X-
X-
X-
X-
X-
X-
X-
X-
X-
X
X
X
X--- 310,315 ----
X
X------- reve.6 -------
X*** /tmp/da28768 Fri Nov 9 10:32:21 1990
X--- reve.6 Fri Nov 9 10:31:13 1990
X***************
X*** 24,31 ****
X--- 24,35 ----
X .B \-l
X .I gamefile
X ] [
X+ .B \-m
X+ ] [
X .B \-n
X ] [
X+ .B \-r
X+ ] [
X .B \-v
X ] [
X .B \-w
X***************
X*** 65,71 ****
X square in which you want your piece to go. Note that it is also possible
X to supply a number and a letter pair, to indicate where you would like your
X new piece to go. This is the only method to place pieces with the dumb tty
X! interface.
X .LP
X There are various buttons and cyclic selections available. Their meanings
X are given below, plus an indication of their keyboard equivalents. With the
X--- 69,76 ----
X square in which you want your piece to go. Note that it is also possible
X to supply a number and a letter pair, to indicate where you would like your
X new piece to go. This is the only method to place pieces with the dumb tty
X! interface. The square containing the last move will be shown with a black
X! outline. This is updated with each new move.
X .LP
X There are various buttons and cyclic selections available. Their meanings
X are given below, plus an indication of their keyboard equivalents. With the
X***************
X*** 83,90 ****
X displayed at the top of the Reve window. Each of these buttons, except
X the "done" button has a keyboard equivalent which is given in brackets below.
X .LP
X- .IP "\fBlast [ l ]\fP" 18
X- Show the last move played.
X .IP "\fBload [ L ]\fP" 18
X Load a game file. The format of this game file is given below. With the
X graphical versions, a text field is displayed between the \fBdone\fP and
X--- 88,93 ----
X***************
X*** 95,100 ****
X--- 98,106 ----
X stop on the invalid line, and display an error message. As each line is
X successfully read from the game file, the piece is displayed on the board,
X and the appropriate pieces flipped.
X+ .IP "\fBmoves? [ A ]\fP" 18
X+ Show all the valid moves for the current board. This is useful for beginners,
X+ and for teaching purposes.
X .IP "\fBnew game [ n ]\fP" 18
X Start a new game of
X .I reve
X***************
X*** 178,184 ****
X The level of difficulty for computer moves. See the \fBDifficulty:\fP
X cyclic item description above for more information.
X .TP
X! .BI \-e "edgefile"
X Specify an alternate location for the
X .I reve
X edge stability table file. Normally the location of this file is compiled
X--- 184,190 ----
X The level of difficulty for computer moves. See the \fBDifficulty:\fP
X cyclic item description above for more information.
X .TP
X! .BI \-e " edgefile"
X Specify an alternate location for the
X .I reve
X edge stability table file. Normally the location of this file is compiled
X***************
X*** 201,208 ****
X--- 207,223 ----
X Load a game file. The format of this game file is given below. The board
X will be setup with these pieces.
X .TP
X+ .B \-m
X+ Always display in monochrome, even on a color screen.
X+ .TP
X .B \-n
X Display computer notes.
X+ .TP
X+ .B \-r
X+ Save a log of computer move information to the file
X+ .I reve.res
X+ as the game progresses. This information is probably only useful to
X+ people trying to improve the computer algorithm.
X .TP
X .B \-?
X Print the version number and usage message for this release of the
X
X------- main.c -------
X*** /tmp/da28803 Fri Nov 9 10:34:47 1990
X--- main.c Wed Nov 7 15:04:18 1990
X***************
X*** 6,16 ****
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is given to distribute these sources, as long as the
X! * introductory messages are not removed, and no monies are exchanged.
X *
X! * You are forbidden from using Reve as is, or in a modified state, in
X! * any tournaments, without the permission of the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X--- 6,21 ----
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is granted to copy this source, for redistribution
X! * in source form only, provided the news headers in "substantially
X! * unaltered format" are retained, the introductory messages are not
X! * removed, and no monies are exchanged.
X *
X! * Permission is also granted to copy this source, without the
X! * news headers, for the purposes of making an executable copy by
X! * means of compilation, provided that such copy will not be used
X! * for the purposes of competition in any othello tournaments, without
X! * prior permission from the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X***************
X*** 17,28 ****
X * (see README file), then an attempt will be made to fix them.
X */
X
X- #include <stdio.h>
X- #include <strings.h>
X- #include <sys/time.h>
X- #include "color.h"
X #include "reve.h"
X #include "patchlevel.h"
X
X /* Text values for the cyclic buttons. */
X char *diff_values[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL } ;
X--- 22,39 ----
X * (see README file), then an attempt will be made to fix them.
X */
X
X #include "reve.h"
X+ #include "color.h"
X #include "patchlevel.h"
X+ #ifdef SYSV
X+ #include <string.h>
X+ #else
X+ #include <strings.h>
X+ #endif /*SYSV*/
X+ #include <sys/time.h>
X+ #ifdef X11
X+ #include <X11/Xos.h>
X+ #endif /*X11*/
X
X /* Text values for the cyclic buttons. */
X char *diff_values[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL } ;
X***************
X*** 45,51 ****
X int cur_ch ; /* Current character pressed. */
X int curx ; /* Current mouse X position. */
X int cury ; /* Current mouse Y position. */
X- int depth ; /* Depth of search for computers move. */
X int down ; /* Indicates is a mouse button is down. */
X int first_move = 0 ; /* Set if computer plays first move. */
X int iconic ; /* Set if window is currently iconic. */
X--- 56,61 ----
X***************
X*** 58,65 ****
X--- 68,77 ----
X int ix ; /* Initial X position of the icon. */
X int iy ; /* Initial Y position of the icon. */
X int last_move ; /* Last valid computer move. */
X+ int level ; /* Current level of difficulty for computer moves. */
X int loadgame = 0 ; /* Set if there is a game file to load. */
X int lsval = 0 ; /* Set to 'l' or 's', if loading or saving. */
X+ int monochrome = 0 ; /* If set, display will be in monochrome. */
X int move ; /* Current move being evaluated. */
X int move_delta ; /* Delta for piece animation. */
X int nextc ; /* Current event identifier. */
X***************
X*** 67,72 ****
X--- 79,86 ----
X int nfont_height ; /* Height in pixels for normal font. */
X int play_computer ; /* Set if playing against the computer. */
X int posspec ; /* Set if -Wp or -g option is present (for X11) */
X+ int saveres = 0 ; /* If set, save computer results to log file. */
X+ int show_moves = 0 ; /* If set, all possible moves are being shown. */
X int show_notes ; /* If set, display notes value from play_reve. */
X int suggestion = -1 ; /* Positive if a suggested move. */
X int suggest_x ; /* X position of suggested move. */
X***************
X*** 93,98 ****
X--- 107,113 ----
X BOARD old_board ; /* The previous reve board. */
X BOARD board ; /* The current reve board. */
X BOARD *s_pos ;
X+ BOARD s_all ; /* List of valid positions for this move. */
X
X BOARD moves[64] ; /* Complete array of board moves. */
X
X***************
X*** 101,110 ****
X /* type x y width height text value function */
X
X { P_BUTTON, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
X! BWIDTH, BHEIGHT, "last", 0, last },
X
X { P_BUTTON, BBORDER + (1*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
X! BWIDTH, BHEIGHT, "load", 0, draw_textfield },
X
X { P_BUTTON, BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
X BWIDTH, BHEIGHT, "new game", 0, new_game },
X--- 116,125 ----
X /* type x y width height text value function */
X
X { P_BUTTON, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
X! BWIDTH, BHEIGHT, "load", 0, draw_textfield },
X
X { P_BUTTON, BBORDER + (1*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
X! BWIDTH, BHEIGHT, "moves?", 0, show_all_moves },
X
X { P_BUTTON, BBORDER + (2*(BWIDTH+BGAP)), BBORDER + (0*(BHEIGHT+BGAP)),
X BWIDTH, BHEIGHT, "new game", 0, new_game },
X***************
X*** 170,175 ****
X--- 185,191 ----
X long c1, c2, c3 ; /* Constants used in evaluation function */
X long edges[6561] ; /* Edges Stability Table */
X long note ; /* Note value for current computer move. */
X+ time_t timeleft ; /* Amount of time left for computer moves. */
X
X extern enum gr_type gtype ; /* Graphics type. */
X
X***************
X*** 190,195 ****
X--- 206,226 ----
X FPRINTF(stderr,"Error initialising window system.\n") ;
X exit(1) ;
X }
X+ generate_graphics(argc, argv, DPY1) ;
X+ if (dtype == XTWO) generate_graphics(argc, argv, DPY2) ;
X+ start_tool(dtype) ; /* Event handling loop. */
X+ exit(0) ;
X+ /*NOTREACHED*/
X+ }
X+
X+
X+ void
X+ generate_graphics(argc, argv, dpyno)
X+ enum dpy_type dpyno ;
X+ int argc ;
X+ char *argv[] ;
X+ {
X+ cur_dpyno = dpyno ;
X make_icon() ;
X make_frame(argc, argv) ; /* Create reve window/icon. */
X make_canvas() ; /* Create drawing canvas. */
X***************
X*** 200,208 ****
X create_menu(NOTES, notes_values) ;
X initboard() ;
X set_cursor(CANVASCUR) ;
X- start_tool(dtype) ; /* Event handling loop. */
X- exit(0) ;
X- /*NOTREACHED*/
X }
X
X
X--- 231,236 ----
X***************
X*** 212,217 ****
X--- 240,246 ----
X char *argv[] ;
X {
X char next[MAXLINE] ; /* The next command line parameter. */
X+ int i ;
X
X INC ;
X while (argc > 0)
X***************
X*** 220,226 ****
X switch (argv[0][1])
X {
X case 'b' : isblack = 1 ;
X! if (*argv != NULL && argv[0][0] != '-')
X {
X INC ;
X black_dpy = *argv ;
X--- 249,255 ----
X switch (argv[0][1])
X {
X case 'b' : isblack = 1 ;
X! if (*(argv+1) != NULL && argv[1][0] != '-')
X {
X INC ;
X black_dpy = *argv ;
X***************
X*** 230,238 ****
X break ;
X case 'd' : INC ;
X getparam(next, argv, "-d needs difficulty") ;
X! depth = atoi(next) ;
X! if (depth < 1 || depth > MAXDIFF) depth = INIT_DEPTH ;
X! items[(int) DIFFICULTY].value = depth - 1 ;
X break ;
X case 'e' : INC ;
X getparam(edgefile, argv, "-e needs an edgetable file") ;
X--- 259,267 ----
X break ;
X case 'd' : INC ;
X getparam(next, argv, "-d needs difficulty") ;
X! level = atoi(next) ;
X! if (level < 1 || level > MAXDIFF) level = INIT_DEPTH ;
X! items[(int) DIFFICULTY].value = level - 1 ;
X break ;
X case 'e' : INC ;
X getparam(edgefile, argv, "-e needs an edgetable file") ;
X***************
X*** 247,260 ****
X getparam(gamefile, argv, "-l needs a game file") ;
X loadgame = 1 ; /* Game file to load. */
X break ;
X case 'n' : show_notes = 1 ; /* Display computer notes. */
X items[(int) NOTES].value = 1 ;
X break ;
X case '?' :
X case 'v' : usage() ;
X
X case 'w' : iswhite = 1 ;
X! if (*argv != NULL && argv[0][0] != '-')
X {
X INC ;
X white_dpy = *argv ;
X--- 276,294 ----
X getparam(gamefile, argv, "-l needs a game file") ;
X loadgame = 1 ; /* Game file to load. */
X break ;
X+ case 'm' : monochrome = 1 ; /* Force display to mono. */
X+ for (i = 0; i < MAXDPY; i++) iscolor[i] = 0 ;
X+ break ;
X case 'n' : show_notes = 1 ; /* Display computer notes. */
X items[(int) NOTES].value = 1 ;
X break ;
X+ case 'r' : saveres = 1 ; /* Save computer results to file. */
X+ break ;
X case '?' :
X case 'v' : usage() ;
X
X case 'w' : iswhite = 1 ;
X! if (*(argv+1) != NULL && argv[1][0] != '-')
X {
X INC ;
X white_dpy = *argv ;
X***************
X*** 382,387 ****
X--- 416,422 ----
X BFONT, color, sa) ;
X }
X batch(IS_OFF) ;
X+ show_last(last_move, IS_ON) ;
X show_suggestion() ;
X batch(IS_ON) ;
X FOR_BOARD(i)
X***************
X*** 423,430 ****
X show_notes = FALSE ;
X isblack = 0 ;
X iswhite = 0 ;
X! depth = INIT_DEPTH ;
X! items[(int) DIFFICULTY].value = depth - 1 ;
X
X black_dpy = NULL ; /* X11 black piece display information. */
X white_dpy = NULL ; /* X11 white piece display information. */
X--- 458,465 ----
X show_notes = FALSE ;
X isblack = 0 ;
X iswhite = 0 ;
X! level = INIT_DEPTH ;
X! items[(int) DIFFICULTY].value = level - 1 ;
X
X black_dpy = NULL ; /* X11 black piece display information. */
X white_dpy = NULL ; /* X11 white piece display information. */
X***************
X*** 512,517 ****
X--- 547,553 ----
X void
X set_display_types()
X {
X+ if (isblack && iswhite) play_computer = 0 ;
X if (isblack && iswhite) dtype = XBOTH ;
X else if (isblack) dtype = XBLACK ;
X else if (iswhite) dtype = XWHITE ;
X***************
X*** 553,559 ****
X int player ;
X {
X set_cursor(HOURGLASS) ;
X! play_reve(board.square, player, depth, &move, ¬e) ;
X set_cursor(CANVASCUR) ;
X animate_move(move) ;
X do_move(player) ;
X--- 589,596 ----
X int player ;
X {
X set_cursor(HOURGLASS) ;
X! move = TRUE ; /* Make sure the computer clock is decremented. */
X! play_reve(board.square, player, level, &move, ¬e) ;
X set_cursor(CANVASCUR) ;
X animate_move(move) ;
X do_move(player) ;
X
X------- makemove.c -------
X*** /tmp/da28806 Fri Nov 9 10:34:48 1990
X--- makemove.c Mon Nov 5 09:06:03 1990
X***************
X*** 7,17 ****
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is given to distribute these sources, as long as the
X! * introductory messages are not removed, and no monies are exchanged.
X *
X! * You are forbidden from using Reve as is, or in a modified state, in
X! * any tournaments, without the permission of the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X--- 7,22 ----
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is granted to copy this source, for redistribution
X! * in source form only, provided the news headers in "substantially
X! * unaltered format" are retained, the introductory messages are not
X! * removed, and no monies are exchanged.
X *
X! * Permission is also granted to copy this source, without the
X! * news headers, for the purposes of making an executable copy by
X! * means of compilation, provided that such copy will not be used
X! * for the purposes of competition in any othello tournaments, without
X! * prior permission from the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X***************
X*** 18,24 ****
X * (see README file), then an attempt will be made to fix them.
X */
X
X- #include <stdio.h>
X #include "reve.h"
X #include "extern.h"
X
X--- 23,28 ----
X***************
X*** 101,106 ****
X--- 105,111 ----
X register int square,offset ;
X int row_offset,col_offset,piece,piece_count ;
X
X+ if ((s_move+increment) < 0 || (s_move+increment) > 63) return(FALSE) ;
X if (s_pos->square[s_move+increment] != s_opponent) return(FALSE) ;
X
X /* Quick test to catch most failures -
X
X------- procs.c -------
X*** /tmp/da28809 Fri Nov 9 10:34:49 1990
X--- procs.c Thu Nov 8 10:46:31 1990
X***************
X*** 7,17 ****
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is given to distribute these sources, as long as the
X! * introductory messages are not removed, and no monies are exchanged.
X *
X! * You are forbidden from using Reve as is, or in a modified state, in
X! * any tournaments, without the permission of the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X--- 7,22 ----
X * Copyright (C) 1990 - Rich Burridge & Yves Gallot.
X * All rights reserved.
X *
X! * Permission is granted to copy this source, for redistribution
X! * in source form only, provided the news headers in "substantially
X! * unaltered format" are retained, the introductory messages are not
X! * removed, and no monies are exchanged.
X *
X! * Permission is also granted to copy this source, without the
X! * news headers, for the purposes of making an executable copy by
X! * means of compilation, provided that such copy will not be used
X! * for the purposes of competition in any othello tournaments, without
X! * prior permission from the authors.
X *
X * No responsibility is taken for any errors on inaccuracies inherent
X * either to the comments or the code of this program, but if reported
X***************
X*** 18,24 ****
X * (see README file), then an attempt will be made to fix them.
X */
X
X- #include <stdio.h>
X #include "color.h"
X #include "reve.h"
X #include "extern.h"
X--- 23,28 ----
X***************
X*** 27,33 ****
X void
X difficulty()
X {
X! depth = next_setting(DIFFICULTY, diff_values) + 1 ;
X }
X
X
X--- 31,37 ----
X void
X difficulty()
X {
X! level = next_setting(DIFFICULTY, diff_values) + 1 ;
X }
X
X
X***************
X*** 46,53 ****
X else
X {
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X! cx = (piece_x + PIECE_RAD) / CELL_SIZE ;
X! cy = ((piece_y - CY) + PIECE_RAD) / CELL_SIZE ;
X move = cy * BOARD_SIZE + cx ;
X make_move() ;
X }
X--- 50,57 ----
X else
X {
X draw_piece(next_player, piece_x, piece_y, RINV) ;
X! cx = (piece_x + PIECE_RAD - BBORDER) / CELL_SIZE ;
X! cy = (piece_y + PIECE_RAD - CY - BBORDER) / CELL_SIZE ;
X move = cy * BOARD_SIZE + cx ;
X make_move() ;
X }
X***************
X*** 66,72 ****
X init_notes()
X {
X show_notes = next_setting(NOTES, notes_values) ;
X! if (show_notes == FALSE) message(NOTES_MES, "") ;
X }
X
X
X--- 70,76 ----
X init_notes()
X {
X show_notes = next_setting(NOTES, notes_values) ;
X! if (show_notes == FALSE) message(EVAL_MES, "") ;
X }
X
X
X***************
X*** 102,110 ****
X message(PANEL_MES, "Computer can't play both players.") ;
X }
X if (curi == HUMAN && curo == COMPUTER)
X! dtype = (next_player == BLACK) ? XBLACK : XWHITE ;
X else if (curi == COMPUTER && curo == HUMAN)
X! dtype = (next_player == BLACK) ? XWHITE : XBLACK ;
X else if (curi == HUMAN && curo == HUMAN)
X dtype = (dtype == XTWO) ? XTWO : XBOTH ;
X
X--- 106,114 ----
X message(PANEL_MES, "Computer can't play both players.") ;
X }
X if (curi == HUMAN && curo == COMPUTER)
X! dtype = (item == BLACK_PLAYS) ? XBLACK : XWHITE ;
X else if (curi == COMPUTER && curo == HUMAN)
X! dtype = (item == BLACK_PLAYS) ? XWHITE : XBLACK ;
X else if (curi == HUMAN && curo == HUMAN)
X dtype = (dtype == XTWO) ? XTWO : XBOTH ;
X
X***************
X*** 116,139 ****
X
X
X void
X- last()
X- {
X- enum optype rop ;
X- int flips, player, x, y ;
X-
X- if (last_move == -1) return ; /* No last move. */
X- player = board.square[last_move] ;
X- for (flips = 0; flips < 4; flips++)
X- {
X- get_xy(last_move, &x, &y) ;
X- rop = flips % 2 ? RSRC : RCLR ;
X- draw_piece(player, x, CY+y, rop) ;
X- PAUSE ;
X- }
X- }
X-
X-
X- void
X make_move()
X {
X if (legal(move, next_player, &board) == FALSE)
X--- 120,125 ----
X***************
X*** 149,160 ****
X case XBLACK :
X case XWHITE : computer_move(OPPONENT(next_player)) ;
X return ;
X! case XBOTH : if (check(next_player) == TRUE) break ;
X (void) check(OPPONENT(next_player)) ;
X return ;
X- case XTWO : FPRINTF(stderr, "Multi display not supported yet.\n") ;
X }
X-
X cmode = (enum cantype) (OPPONENT(next_player) + 1) ;
X next_player = OPPONENT(next_player) ;
X }
X--- 135,145 ----
X case XBLACK :
X case XWHITE : computer_move(OPPONENT(next_player)) ;
X return ;
X! case XBOTH :
X! case XTWO : if (check(next_player) == TRUE) break ;
X (void) check(OPPONENT(next_player)) ;
X return ;
X }
X cmode = (enum cantype) (OPPONENT(next_player) + 1) ;
X next_player = OPPONENT(next_player) ;
X }
X***************
X*** 168,174 ****
X last_move = -1 ;
X if (items[(int) BLACK_PLAYS].value == COMPUTER) first_move = 1 ;
X init_canvas() ;
X! message(NOTES_MES, "") ;
X message(PANEL_MES, "Use left mouse button to move") ;
X draw_button(NEW_GAME_BUT, C_LGREY, BUT_NORMAL) ;
X }
X--- 153,159 ----
X last_move = -1 ;
X if (items[(int) BLACK_PLAYS].value == COMPUTER) first_move = 1 ;
X init_canvas() ;
X! message(EVAL_MES, "") ;
X message(PANEL_MES, "Use left mouse button to move") ;
X draw_button(NEW_GAME_BUT, C_LGREY, BUT_NORMAL) ;
X }
X***************
X*** 208,213 ****
X--- 193,206 ----
X
X
X void
X+ show_all_moves()
X+ {
X+ if (show_moves) show_all(IS_OFF) ;
X+ else show_all(IS_ON) ;
X+ }
X+
X+
X+ void
X suggest()
X {
X int player ;
X***************
X*** 216,222 ****
X if (cmode == GAME_OVER) return ;
X if (cmode == WHITE_START) player = WHITE ;
X else player = BLACK ;
X! play_reve(&board.square[0], player, depth, &suggestion, ¬e) ;
X
X suggest_x = BBORDER + ((suggestion & 7) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
X suggest_y = BBORDER + ((suggestion >> 3) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
X--- 209,216 ----
X if (cmode == GAME_OVER) return ;
X if (cmode == WHITE_START) player = WHITE ;
X else player = BLACK ;
X! suggestion = FALSE ; /* Make sure the computer clock isn't decremented. */
X! play_reve(&board.square[0], player, level, &suggestion, ¬e) ;
X
X suggest_x = BBORDER + ((suggestion & 7) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
X suggest_y = BBORDER + ((suggestion >> 3) + 1) * CELL_SIZE - CELL_SIZE / 2 ;
X***************
X*** 259,269 ****
X--- 253,266 ----
X
X if (n >= 3)
X {
X+ show_last(last_move, IS_OFF) ;
X FOR_BOARD(i) board.square[i] = moves[n].square[i] ;
X board.moves_left = moves[n].moves_left ;
X board.player = moves[n].player ;
X board.move = moves[n].move ;
X board.note = moves[n].note ;
X+ board.timeleft = moves[n].timeleft ;
X+ last_move = board.move ;
X moves[n+1].move = -1 ;
X
X FOR_BOARD(i) old_board.square[i] = moves[n-1].square[i] ;
X***************
X*** 271,277 ****
X--- 268,277 ----
X old_board.player = moves[n-1].player ;
X old_board.move = moves[n-1].move ;
X old_board.note = moves[n-1].note ;
X+ old_board.timeleft = moves[n-1].timeleft ;
X
X+ timeleft = board.timeleft ;
X+
X if (OPPONENT(player) == BLACK) cmode = BLACK_START ;
X else cmode = WHITE_START ;
X message(PANEL_MES, "") ;
X***************
X*** 284,289 ****
X--- 284,290 ----
X (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE) ;
X else draw_piece(board.square[i], x, CY+y, RSRC) ;
X }
X+ if (n > 3) show_last(last_move, IS_ON) ;
X next_player = OPPONENT(board.player) ;
X }
X else message(PANEL_MES, "No moves to undo.") ;
X
X
END_OF_FILE
if test 51889 -ne `wc -c <'patches01b'`; then
echo shar: \"'patches01b'\" unpacked with wrong size!
fi
# end of 'patches01b'
fi
echo shar: End of archive 2 \(of 4\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 4 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