[comp.sources.games] v04i041: cubes - a netowrked dice game, Patch1

games@tekred.TEK.COM (06/17/88)

Submitted by: gmp@rayssd.RAY.COM (Gregory M. Paris)
Comp.sources.games: Volume 4, Issue 41
Archive-name: cubes/Patch1


#! /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 shell archive."
# Contents:  cubes.pch1
# Wrapped by billr@saab on Thu Jun 16 14:03:06 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f cubes.pch1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"cubes.pch1\"
else
echo shar: Extracting \"cubes.pch1\" \(36850 characters\)
sed "s/^X//" >cubes.pch1 <<'END_OF_cubes.pch1'
XIndex: README
XPrereq: cubes
X*** README.orig	Thu Jun  2 22:45:16 1988
X--- README	Wed Jun 15 15:26:38 1988
X***************
X*** 91,93
X  Greg Paris, June 2, 1988
X  gmp@rayssd.ray.com or gmp%rayssd.ray.com@a.cs.uiuc.edu
X  {att,decuac,gatech,necntc,sun,uiucdcs,ukma}!rayssd!gmp
X
X--- 91,119 -----
X  Greg Paris, June 2, 1988
X  gmp@rayssd.ray.com or gmp%rayssd.ray.com@a.cs.uiuc.edu
X  {att,decuac,gatech,necntc,sun,uiucdcs,ukma}!rayssd!gmp
X+ 
X+ -------------------------------------------------------------------------------
X+ This is patch #1 for cubes.  It brings all source files and the manual page
X+ to revision level 2.1.  Notable changes due to this patch are listed below.
X+ 
X+ 1. Corrects a bug with the server that caused it to go into a wait loop rather
X+    than hang in select as it was supposed to do.
X+ 2. Causes the screen to be updated properly when leaving quiet mode.
X+ 3. Fixes an insignificant bug in the ordering of the score file.
X+ 4. Late entries are added to the beginning rather than the end of the roster.
X+ 5. Late entries are given 500 points less than the lowest (was 75% of lowest).
X+ 6. Redraws the roster when players leave the game.
X+ 7. Assigns proxies when players leave before getting on board (sometimes).
X+ 8. Checks the CUBEHOST environment variable for a favorite server host.
X+ 9. Corrected some spelling errors (including one misspelled computer).
X+ 
X+ This patch does not attempt to correct your player scoring history file,
X+ nominally /usr/games/lib/cubes.hist.  The name of the computer player
X+ Woper has been changed to the correct spelling W.O.P.R.  If you care, then
X+ you should make this change to your score file manually.  Make the change
X+ before you start up the newly installed server, but after killing any
X+ running old one.
X+ 
X+ Greg Paris
X+ June 15, 1988
X+ 
X
XIndex: actions.c
XPrereq: 1.1
X*** actions.c.orig	Wed Jun 15 13:57:00 1988
X--- actions.c	Wed Jun 15 13:57:01 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)actions.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)actions.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
XIndex: avg.c
XPrereq: 1.1
X*** avg.c.orig	Wed Jun 15 13:57:07 1988
X--- avg.c	Wed Jun 15 13:57:08 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)avg.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)avg.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
XIndex: cubes.6
XPrereq: CUBES
X*** cubes.6.orig	Wed Jun 15 13:59:59 1988
X--- cubes.6	Wed Jun 15 13:36:54 1988
X***************
X*** 1,5
X  .TH CUBES 6-usenet comp.sources.games USENET "UNIX Gaming Manual"
X! .\" Copyright 1988 Gregory M. Paris
X  .SH NAME
X  cubes \- multi-player dice game
X  .SH SYNOPSIS
X
X--- 1,5 -----
X  .TH CUBES 6-usenet comp.sources.games USENET "UNIX Gaming Manual"
X! .\" sccsid: @(#)cubes.6 2.1 6/15/88 Copyright 1988 Gregory M. Paris
X  .SH NAME
X  cubes \- multi-player dice game
X  .SH SYNOPSIS
X***************
X*** 44,50
X  The program assumes that the server is on the same system as the player.
X  If this is not so, the
X  .RB ` \-h \  host '
X! option must be used to tell
X  .I cubes
X  which system the server is running on.
X  .PP
X
X--- 44,50 -----
X  The program assumes that the server is on the same system as the player.
X  If this is not so, the
X  .RB ` \-h \  host '
X! option can be used to tell
X  .I cubes
X  which system the server is running on.
X  If you normally connect to a server on another system,
X***************
X*** 47,52
X  option must be used to tell
X  .I cubes
X  which system the server is running on.
X  .PP
X  If your terminal supports either DEC or Zenith graphics character sets,
X  you can tell
X
X--- 47,57 -----
X  option can be used to tell
X  .I cubes
X  which system the server is running on.
X+ If you normally connect to a server on another system,
X+ you may find it more convenient to set the
X+ .B CUBEHOST
X+ environment variable to that system's name.
X+ (The command line option overrides the environment variable.)
X  .PP
X  If your terminal supports either DEC or Zenith graphics character sets,
X  you can tell
X***************
X*** 305,311
X  .PP
X  It should be noted that quitting a game before it ends may result in a
X  low score being added to your record.
X! This will not happen if you have zero points when you quit.
X  Quitting at any other time could lower your ranking against other players.
X  .SH MISCELLANY
X  It is possible to join a game in progress.
X
X--- 310,318 -----
X  .PP
X  It should be noted that quitting a game before it ends may result in a
X  low score being added to your record.
X! This will not happen if you are not yet on board when you quit
X! (but read the miscellaneous item below about proxy players
X! for a qualification to this remark).
X  Quitting at any other time could lower your ranking against other players.
X  .SH MISCELLANY
X  It is possible to join a game in progress.
X***************
X*** 314,320
X  (defined as the high score being 9,000 points or better),
X  you will be added as an active player at the end of the current round.
X  Since coming into a game late with no points could ruin your ranking,
X! the cube server will give you an initial score of about 75% of the lowest score,
X  but you still must meet the 500 turn point
X  .I On Board
X  requirement in order to begin advancing your score.
X
X--- 321,328 -----
X  (defined as the high score being 9,000 points or better),
X  you will be added as an active player at the end of the current round.
X  Since coming into a game late with no points could ruin your ranking,
X! the cube server will give you an initial score
X! that is 500 points less than the lowest score,
X  but you still must meet the 500 turn point
X  .I On Board
X  requirement in order to begin advancing your score
X***************
X*** 317,323
X  the cube server will give you an initial score of about 75% of the lowest score,
X  but you still must meet the 500 turn point
X  .I On Board
X! requirement in order to begin advancing your score.
X  .PP
X  On some systems,
X  it is possible to tell the state of the cube server by doing a
X
X--- 325,332 -----
X  that is 500 points less than the lowest score,
X  but you still must meet the 500 turn point
X  .I On Board
X! requirement in order to begin advancing your score
X! (and you may quit the game with impunity before doing so).
X  .PP
X  On some systems,
X  it is possible to tell the state of the cube server by doing a
X
XIndex: cubes.c
XPrereq: 1.1
X*** cubes.c.orig	Wed Jun 15 13:57:16 1988
X--- cubes.c	Wed Jun 15 13:57:19 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)cubes.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)cubes.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X***************
X*** 67,72
X  
X  	if(pname == 0)
X  		getplrname();
X  	if(opensocktoserv() < 0)
X  		exit(1);
X  
X
X--- 67,75 -----
X  
X  	if(pname == 0)
X  		getplrname();
X+ 	if(shost == 0)
X+ 		shost = getenv("CUBEHOST");
X+ 
X  	if(opensocktoserv() < 0)
X  		exit(1);
X  
X
XIndex: cubes.h
XPrereq: 1.1
X*** cubes.h.orig	Wed Jun 15 13:57:22 1988
X--- cubes.h	Wed Jun 15 13:57:24 1988
X***************
X*** 1,6
X  /* vi:set sw=4 ts=4: */
X  /*
X! **	sccsid: @(#)cubes.h 1.1 6/2/88 Copyright 1988 Gregory M. Paris
X  */
X  
X  /*
X
X--- 1,6 -----
X  /* vi:set sw=4 ts=4: */
X  /*
X! **	sccsid: @(#)cubes.h 2.1 6/15/88 Copyright 1988 Gregory M. Paris
X  */
X  
X  /*
X
XIndex: cubeserver.c
XPrereq: 1.1
X*** cubeserver.c.orig	Wed Jun 15 13:57:28 1988
X--- cubeserver.c	Wed Jun 15 13:57:29 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)cubeserver.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)cubeserver.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X***************
X*** 323,328
X  oldplayer(c)
X  register int	c;
X  {
X  	/*
X  	**	Close the socket if one is open.
X  	*/
X
X--- 323,330 -----
X  oldplayer(c)
X  register int	c;
X  {
X+ 	boolean		proxied;
X+ 
X  	/*
X  	**	Close the socket if one is open.
X  	*/
X***************
X*** 347,352
X  		plr[c].p_id[0] = '\0';
X  		annfarewell(c);
X  		break;
X  	case Active:
X  		/*
X  		**	If game in progress and this player has some points,
X
X--- 349,355 -----
X  		plr[c].p_id[0] = '\0';
X  		annfarewell(c);
X  		break;
X+ 
X  	case Active:
X  		/*
X  		**	If game in progress and there are other humans playing and this
X***************
X*** 349,360
X  		break;
X  	case Active:
X  		/*
X! 		**	If game in progress and this player has some points,
X! 		**	then there's a chance that a computer proxy will be
X! 		**	assigned to take over.  The proxy keeps the original
X! 		**	name so that other players are not made aware.  The
X! 		**	id is also left unchanged so that a single player can't
X! 		**	flood the game with proxies.
X  		*/
X  		if(inprogress == True && plr[c].p_onboard == True && dieroll(5) > 2) {
X  			plr[c].p_stat = Computer;
X
X--- 352,365 -----
X  
X  	case Active:
X  		/*
X! 		**	If game in progress and there are other humans playing and this
X! 		**	player is on board, then there's a good chance that a computer
X! 		**	proxy will be assigned to take over.  The proxy keeps the original
X! 		**	name so that other players are not made aware.  The id is also
X! 		**	left unchanged so that a single player can't flood the game with
X! 		**	proxies.  We do this substitution, more rarely, when a player
X! 		**	is not yet on board, to penalize players that repeatedly start
X! 		**	and quit games looking for an initial big advantage.
X  		*/
X  		proxied = False;
X  		if(inprogress == True && active > 1) {
X***************
X*** 356,365
X  		**	id is also left unchanged so that a single player can't
X  		**	flood the game with proxies.
X  		*/
X! 		if(inprogress == True && plr[c].p_onboard == True && dieroll(5) > 2) {
X! 			plr[c].p_stat = Computer;
X! 			pickstrategy(c);	/* also chooses temperment */
X! 		} else {
X  			if(inprogress == True && plr[c].p_onboard == True)
X  				histpoints(c);
X  			plr[c].p_stat = Inactive;
X
X--- 361,385 -----
X  		**	is not yet on board, to penalize players that repeatedly start
X  		**	and quit games looking for an initial big advantage.
X  		*/
X! 		proxied = False;
X! 		if(inprogress == True && active > 1) {
X! 			if(	(plr[c].p_onboard == True && dieroll(5) > 2)	/* 3/5ths */
X! 			||	(plr[c].p_onboard == False && dieroll(5) == 1)	/* 1/5th */
X! 			) {
X! 				plr[c].p_stat = Computer;
X! 				pickstrategy(c);	/* also chooses temperament */
X! 				proxied = True;
X! 			}
X! 		}
X! 
X! 		/*
X! 		**	If the player wasn't replaced, then we remove.
X! 		*/
X! 		if(proxied == False) {
X! 			/*
X! 			**	If a game is in progress and this player is onboard,
X! 			**	penalize for quitting by recording this score.
X! 			*/
X  			if(inprogress == True && plr[c].p_onboard == True)
X  				histpoints(c);
X  
X***************
X*** 362,367
X  		} else {
X  			if(inprogress == True && plr[c].p_onboard == True)
X  				histpoints(c);
X  			plr[c].p_stat = Inactive;
X  			plr[c].p_score = 0;
X  			plr[c].p_onboard = False;
X
X--- 382,388 -----
X  			*/
X  			if(inprogress == True && plr[c].p_onboard == True)
X  				histpoints(c);
X+ 
X  			plr[c].p_stat = Inactive;
X  			plr[c].p_score = 0;
X  			plr[c].p_onboard = False;
X***************
X*** 369,375
X  			plr[c].p_id[0] = '\0';
X  			annfarewell(c);
X  		}
X! 		--active;
X  		break;
X  	case Waiting:
X  		plr[c].p_stat = Inactive;
X
X--- 390,403 -----
X  			plr[c].p_id[0] = '\0';
X  			annfarewell(c);
X  		}
X! 
X! 		if(--active < 0) {
X! 			fprintf(stderr,
X! 				"oldplayer: active=%d (shouldn't be negative)\n", active);
X! 			active = 0;
X! 		}
X! 		if(active == 0)
X! 			inprogress = False;	/* XXX: update computer points history? */
X  		break;
X  
X  	case Waiting:
X***************
X*** 371,376
X  		}
X  		--active;
X  		break;
X  	case Waiting:
X  		plr[c].p_stat = Inactive;
X  		--waiting;
X
X--- 399,405 -----
X  		if(active == 0)
X  			inprogress = False;	/* XXX: update computer points history? */
X  		break;
X+ 
X  	case Waiting:
X  		plr[c].p_stat = Inactive;
X  		if(--waiting < 0) {
X***************
X*** 373,379
X  		break;
X  	case Waiting:
X  		plr[c].p_stat = Inactive;
X! 		--waiting;
X  		break;
X  	}
X  	if(active <= 0) {
X
X--- 402,411 -----
X  
X  	case Waiting:
X  		plr[c].p_stat = Inactive;
X! 		if(--waiting < 0) {
X! 			fprintf(stderr, "oldplayer: waiting=%d (shouldn't be negative)\n", waiting);
X! 			waiting = 0;
X! 		}
X  		break;
X  	}
X  }
X***************
X*** 376,388
X  		--waiting;
X  		break;
X  	}
X- 	if(active <= 0) {
X- 		/*
X- 		**	XXX: update computer points history here?
X- 		*/
X- 		inprogress = False;
X- 		active = 0;
X- 	}
X  }
X  
X  /*
X
X--- 408,413 -----
X  		}
X  		break;
X  	}
X  }
X  
X  /*
X***************
X*** 437,443
X  	FD_SET(plr[c].p_fd, &rdy);
X  	(void) select(plr[c].p_fd+1, NOSEL, &rdy, NOSEL, &poll);
X  	if((n = write(plr[c].p_fd, mesg, mesglen)) < 0) {
X! 		if(errno != EPIPE)
X  			perror("message: write");
X  		(void) alarm(0);
X  		oldplayer(c);
X
X--- 462,468 -----
X  	FD_SET(plr[c].p_fd, &rdy);
X  	(void) select(plr[c].p_fd+1, NOSEL, &rdy, NOSEL, &poll);
X  	if((n = write(plr[c].p_fd, mesg, mesglen)) < 0) {
X! 		if(errno != EPIPE && errno != ENOTCONN)
X  			perror("message: write");
X  		(void) alarm(0);
X  		oldplayer(c);
X***************
X*** 574,580
X  /*21*/	"Mother",
X  /*22*/	"Ashe",
X  /*23*/	"Bishop",
X! /*24*/	"Woper",
X  /*25*/	"The Terminator",
X  /*26*/	"Number Five",
X  /*27*/	"Jenkins",
X
X--- 599,605 -----
X  /*21*/	"Mother",
X  /*22*/	"Ashe",
X  /*23*/	"Bishop",
X! /*24*/	"W.O.P.R.",
X  /*25*/	"The Terminator",
X  /*26*/	"Number Five",
X  /*27*/	"Jenkins",
X***************
X*** 619,624
X  			++active, --waiting;
X  		}
X  	}
X  
X  	/*
X  	**	Count computer players.
X
X--- 644,653 -----
X  			++active, --waiting;
X  		}
X  	}
X+ 	if(waiting != 0) {
X+ 		fprintf(stderr, "begingame: waiting=%d (should be zero)\n", waiting);
X+ 		waiting = 0;
X+ 	}
X  
X  	/*
X  	**	Count computer players.
X***************
X*** 643,649
X  					plr[c].p_onboard = False;
X  					strcpy(plr[c].p_name, compname[cc]);
X  					plr[c].p_id[0] = '\0';	/* non-proxies are null */
X! 					pickstrategy(c);		/* also chooses temperment */
X  					++ncomp;
X  				}
X  				break;
X
X--- 672,678 -----
X  					plr[c].p_onboard = False;
X  					strcpy(plr[c].p_name, compname[cc]);
X  					plr[c].p_id[0] = '\0';	/* non-proxies are null */
X! 					pickstrategy(c);		/* also chooses temperament */
X  					++ncomp;
X  				}
X  				break;
X***************
X*** 809,815
X  	updstat(-1);
X  
X  	/*
X! 	**	Add any waiting players until the game is 9/10ths over.
X  	*/
X  	if(waiting > 0 && active > 0 && inprogress == True)
X  		if(highscore(-1) < (9 * WINSCORE) / 10)
X
X--- 838,846 -----
X  	updstat(-1);
X  
X  	/*
X! 	**	If a game is inprogress, we may wish to adjust the roster
X! 	**	due to players entering and leaving.  We refuse to add
X! 	**	waiting players once the game is 9/10ths over.
X  	*/
X  	if(active > 0 && inprogress == True) {
X  		if(waiting > 0 && highscore(-1) < (9 * WINSCORE) / 10)
X***************
X*** 811,819
X  	/*
X  	**	Add any waiting players until the game is 9/10ths over.
X  	*/
X! 	if(waiting > 0 && active > 0 && inprogress == True)
X! 		if(highscore(-1) < (9 * WINSCORE) / 10)
X! 			addwaiting();
X  }
X  
X  /*
X
X--- 842,853 -----
X  	**	due to players entering and leaving.  We refuse to add
X  	**	waiting players once the game is 9/10ths over.
X  	*/
X! 	if(active > 0 && inprogress == True) {
X! 		if(waiting > 0 && highscore(-1) < (9 * WINSCORE) / 10)
X! 			fixroster(True);	/* add waiting players */
X! 		else
X! 			fixroster(False);	/* make waiting players wait */
X! 	}
X  }
X  
X  /*
X***************
X*** 914,920
X  	plr[COMP].p_id[0] = '\0';
X  	plr[COMP].p_score = 0;
X  	plr[COMP].p_onboard = False;
X! 	pickstrategy(COMP);		/* also chooses temperment */
X  }
X  
X  /*
X
X--- 948,954 -----
X  	plr[COMP].p_id[0] = '\0';
X  	plr[COMP].p_score = 0;
X  	plr[COMP].p_onboard = False;
X! 	pickstrategy(COMP);		/* also chooses temperament */
X  }
X  
X  /*
X***************
X*** 1182,1188
X  }
X  
X  /*
X! **	lowscore: give new player a low score
X  */
X  lowscore(c)
X  int		c;
X
X--- 1216,1222 -----
X  }
X  
X  /*
X! **	lowscore: report the lowest score
X  */
X  lowscore()
X  {
X***************
X*** 1184,1191
X  /*
X  **	lowscore: give new player a low score
X  */
X! lowscore(c)
X! int		c;
X  {
X  	register int	cc, low;
X  
X
X--- 1218,1224 -----
X  /*
X  **	lowscore: report the lowest score
X  */
X! lowscore()
X  {
X  	register int	cc, low;
X  
X***************
X*** 1191,1197
X  
X  	low = 2 * WINSCORE;
X  	for(cc = 0;cc < PLAYERS;++cc) {
X! 		if(cc != c && plr[cc].p_score < low) {
X  			switch(plr[cc].p_stat) {
X  			case Active:
X  			case Computer:
X
X--- 1224,1230 -----
X  
X  	low = 2 * WINSCORE;
X  	for(cc = 0;cc < PLAYERS;++cc) {
X! 		if(plr[cc].p_score < low) {
X  			switch(plr[cc].p_stat) {
X  			case Active:
X  			case Computer:
X***************
X*** 1201,1216
X  		}
X  	}
X  
X! 	/*
X! 	**	Set player score to 75% of lowest score.  Score must be a multiple of
X! 	**	P_FIVE and must be greater than or equal to ONBOARD.
X! 	*/
X! 	low = (3 * low) / 4;
X! 	low = (low / P_FIVE) * P_FIVE;
X! 	if(low < ONBOARD)
X! 		low = 0;
X! 	plr[c].p_score = low;		/* a putrid score, but... */
X! 	plr[c].p_onboard = False;	/* not on board yet */
X  }
X  
X  /*
X
X--- 1234,1240 -----
X  		}
X  	}
X  
X! 	return low;
X  }
X  
X  /*
X***************
X*** 1222,1228
X  	register int	c, n, h;
X  	char			buf[2*STATLEN+NAMELEN];
X  
X! 	if(active == 0)
X  		strcpy(buf, "idle");
X  	else {
X  		for(h = n = c = 0;c < PLAYERS;++c) {
X
X--- 1246,1252 -----
X  	register int	c, n, h;
X  	char			buf[2*STATLEN+NAMELEN];
X  
X! 	if(active == 0 && waiting == 0)
X  		strcpy(buf, "idle");
X  	else if(active == 0 && waiting != 0)
X  		sprintf(buf, "idle wt%d", waiting);
X***************
X*** 1224,1229
X  
X  	if(active == 0)
X  		strcpy(buf, "idle");
X  	else {
X  		for(h = n = c = 0;c < PLAYERS;++c) {
X  			if(plr[c].p_stat == Computer || plr[c].p_stat == Active) {
X
X--- 1248,1255 -----
X  
X  	if(active == 0 && waiting == 0)
X  		strcpy(buf, "idle");
X+ 	else if(active == 0 && waiting != 0)
X+ 		sprintf(buf, "idle wt%d", waiting);
X  	else {
X  		for(h = n = c = 0;c < PLAYERS;++c) {
X  			if(plr[c].p_stat == Computer || plr[c].p_stat == Active) {
X***************
X*** 1236,1242
X  			sprintf(buf, "waiting pl%d", n);
X  		else if(cup < 0)
X  			sprintf(buf, "active pl%d hs%d tn%d", n, h, turnnum);
X! 		else
X  			sprintf(buf, "active pl%d hs%d tn%d %s",
X  				n, h, turnnum, plr[cup].p_name);
X  	}
X
X--- 1262,1268 -----
X  			sprintf(buf, "waiting pl%d", n);
X  		else if(cup < 0)
X  			sprintf(buf, "active pl%d hs%d tn%d", n, h, turnnum);
X! 		else if(waiting == 0)
X  			sprintf(buf, "active pl%d hs%d tn%d %s",
X  				n, h, turnnum, plr[cup].p_name);
X  		else
X***************
X*** 1239,1244
X  		else
X  			sprintf(buf, "active pl%d hs%d tn%d %s",
X  				n, h, turnnum, plr[cup].p_name);
X  	}
X  
X  	sprintf(statusline, "cubes %-*s.", STATLEN-7, buf);
X
X--- 1265,1273 -----
X  		else if(waiting == 0)
X  			sprintf(buf, "active pl%d hs%d tn%d %s",
X  				n, h, turnnum, plr[cup].p_name);
X+ 		else
X+ 			sprintf(buf, "active pl%d wt%d hs%d tn%d %s",
X+ 				n, waiting, h, turnnum, plr[cup].p_name);
X  	}
X  
X  	sprintf(statusline, "cubes %-*s.", STATLEN-7, buf);
X***************
X*** 1381,1387
X  }
X  
X  /*
X! **	addwaiting: add waiting players to a game in progress.
X  */
X  addwaiting()
X  {
X
X--- 1410,1419 -----
X  }
X  
X  /*
X! **	fixroster: do any necessary roster adjustment
X! **		if add is true, we can add waiting players to the front of
X! **		the roster.  If false, we will move them to the end.
X! **		Collapses out inactive slots.
X  */
X  fixroster(add)
X  boolean		add;
X***************
X*** 1383,1389
X  /*
X  **	addwaiting: add waiting players to a game in progress.
X  */
X! addwaiting()
X  {
X  	int		c, cc;
X  	char	msgbuf[MESGLEN];
X
X--- 1415,1422 -----
X  **		the roster.  If false, we will move them to the end.
X  **		Collapses out inactive slots.
X  */
X! fixroster(add)
X! boolean		add;
X  {
X  	int		c, cc, low;
X  	player	tmp[PLAYERS];
X***************
X*** 1385,1392
X  */
X  addwaiting()
X  {
X! 	int		c, cc;
X! 	char	msgbuf[MESGLEN];
X  
X  	if(waiting <= 0 || inprogress == False)
X  		return;
X
X--- 1418,1425 -----
X  fixroster(add)
X  boolean		add;
X  {
X! 	int		c, cc, low;
X! 	player	tmp[PLAYERS];
X  
X  	/*
X  	**	No reason to do this except during a game.
X***************
X*** 1388,1394
X  	int		c, cc;
X  	char	msgbuf[MESGLEN];
X  
X! 	if(waiting <= 0 || inprogress == False)
X  		return;
X  
X  	for(c = 0;c < PLAYERS;++c) {
X
X--- 1421,1430 -----
X  	int		c, cc, low;
X  	player	tmp[PLAYERS];
X  
X! 	/*
X! 	**	No reason to do this except during a game.
X! 	*/
X! 	if(inprogress == False)
X  		return;
X  
X  	/*
X***************
X*** 1391,1401
X  	if(waiting <= 0 || inprogress == False)
X  		return;
X  
X! 	for(c = 0;c < PLAYERS;++c) {
X! 		if(plr[c].p_stat != Waiting)
X! 			continue;
X! 		plr[c].p_stat = Active;
X! 		++active, --waiting;
X  
X  		sprintf(msgbuf, "%d You are player %d (%s).\r\n",
X  			M_UARE, c, plr[c].p_name);
X
X--- 1427,1448 -----
X  	if(inprogress == False)
X  		return;
X  
X! 	/*
X! 	**	If there are no waiting players, or we're not allowed to add them,
X! 	**	check for "empty" slots in the roster.  We define empty here as
X! 	**	Inactive or Waiting, since to active players, slots held by
X! 	**	Waiting players appear empty.
X! 	*/
X! 	if(waiting == 0 || add == False) {
X! 		for(c = 0;c < PLAYERS;++c)		/* find first empty slot */
X! 			if(plr[c].p_stat == Inactive || plr[c].p_stat == Waiting)
X! 				break;
X! 		for(++c;c < PLAYERS;++c)		/* look for a non-empty slot */
X! 			if(plr[c].p_stat != Inactive && plr[c].p_stat != Waiting)
X! 				break;
X! 		if(c >= PLAYERS)				/* didn't find any */
X! 			return;
X! 	}
X  
X  	/*
X  	**	If we are allowed to add waiting players, put them
X***************
X*** 1397,1409
X  		plr[c].p_stat = Active;
X  		++active, --waiting;
X  
X! 		sprintf(msgbuf, "%d You are player %d (%s).\r\n",
X! 			M_UARE, c, plr[c].p_name);
X! 		if(message(c, msgbuf) < 0)
X! 			continue;
X! 		sprintf(msgbuf, "%d You have entered a game in progress.\r\n", M_INFO);
X! 		if(message(c, msgbuf) < 0)
X! 			continue;
X  
X  		lowscore(c);
X  		for(cc = 0;cc < PLAYERS;++cc) {
X
X--- 1444,1473 -----
X  			return;
X  	}
X  
X! 	/*
X! 	**	If we are allowed to add waiting players, put them
X! 	**	first, otherwise, put them last.  In either case,
X! 	**	this algorithm removes empty slots.
X! 	*/
X! 	cc = 0;
X! 	if(add == True) {
X! 		for(c = 0;c < PLAYERS;++c)	/* first pass, waiting players */
X! 			if(plr[c].p_stat == Waiting)
X! 				tmp[cc++] = plr[c];
X! 	}
X! 	for(c = 0;c < PLAYERS;++c)		/* second pass, active players */
X! 		if(plr[c].p_stat == Active || plr[c].p_stat == Computer)
X! 			tmp[cc++] = plr[c];
X! 	if(add == False) {
X! 		for(c = 0;c < PLAYERS;++c)	/* third pass, waiting players */
X! 			if(plr[c].p_stat == Waiting)
X! 				tmp[cc++] = plr[c];
X! 	}
X! 	if(cc == 0) {
X! 		fprintf(stderr, "fixroster: no players!\n");
X! 		active = waiting = 0;
X! 		return;
X! 	}
X  
X  	/*
X  	**	Calculate a suitable low score for any new players.
X***************
X*** 1405,1431
X  		if(message(c, msgbuf) < 0)
X  			continue;
X  
X! 		lowscore(c);
X! 		for(cc = 0;cc < PLAYERS;++cc) {
X! 			switch(plr[cc].p_stat) {
X! 			case Computer:
X! 			case Active:
X! 			case Waiting:
X! 				sprintf(msgbuf, "%d player %d %s\r\n",
X! 					M_PNUM, cc, plr[cc].p_name);
X! 				if(message(c, msgbuf) < 0) {
X! 					cc = PLAYERS;
X! 					continue;
X! 				}
X! 				sprintf(msgbuf, "%d Player %d now has %d points.\r\n",
X! 					M_OSCO, cc, plr[cc].p_score);
X! 				if(message(c, msgbuf) < 0) {
X! 					cc = PLAYERS;
X! 					continue;
X! 				}
X! 				break;
X! 			}
X! 		}
X  
X  		sprintf(msgbuf, "%d player %d %s\r\n", M_PNUM, c, plr[c].p_name);
X  		announce(c, msgbuf);
X
X--- 1469,1479 -----
X  		return;
X  	}
X  
X! 	/*
X! 	**	Calculate a suitable low score for any new players.
X! 	*/
X! 	if(waiting == 0 || add == False || (low = lowscore() - ONBOARD) < 0)
X! 		low = 0;
X  
X  	/*
X  	**	Copy the reordered roster into the real one while at the
X***************
X*** 1427,1434
X  			}
X  		}
X  
X! 		sprintf(msgbuf, "%d player %d %s\r\n", M_PNUM, c, plr[c].p_name);
X! 		announce(c, msgbuf);
X! 		annscore(c);
X  	}
X  }
X
X--- 1475,1492 -----
X  	if(waiting == 0 || add == False || (low = lowscore() - ONBOARD) < 0)
X  		low = 0;
X  
X! 	/*
X! 	**	Copy the reordered roster into the real one while at the
X! 	**	same time adding waiting players (if allowed).
X! 	*/
X! 	for(c = 0;c < cc;++c) {
X! 		plr[c] = tmp[c];
X! 		if(add == True && plr[c].p_stat == Waiting) {
X! 			plr[c].p_score = low;
X! 			plr[c].p_onboard = False;
X! 			plr[c].p_stat = Active;
X! 			--waiting, ++active;
X! 		}
X  	}
X  	for(;c < PLAYERS;++c)
X  		plr[c].p_stat = Inactive;
X***************
X*** 1431,1434
X  		announce(c, msgbuf);
X  		annscore(c);
X  	}
X  }
X
X--- 1488,1502 -----
X  			--waiting, ++active;
X  		}
X  	}
X+ 	for(;c < PLAYERS;++c)
X+ 		plr[c].p_stat = Inactive;
X+ 	if(waiting != 0) {
X+ 		fprintf(stderr, "fixroster: waiting=%d (should be zero)\n", waiting);
X+ 		waiting = 0;
X+ 	}
X+ 
X+ 	/*
X+ 	**	Broadcast the new roster to all players.
X+ 	*/
X+ 	roster(-1);
X  }
X
XIndex: dieopts.c
XPrereq: 1.1
X*** dieopts.c.orig	Wed Jun 15 13:57:34 1988
X--- dieopts.c	Wed Jun 15 13:57:35 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)dieopts.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<strings.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)dieopts.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<strings.h>
X
XIndex: history.c
XPrereq: 1.1
X*** history.c.orig	Wed Jun 15 13:57:38 1988
X--- history.c	Wed Jun 15 13:57:39 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)history.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)history.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X***************
X*** 79,86
X  }
X  
X  /*
X! **	histcmp: history comparison function
X! **		best win average, then best point average
X  */
X  histcmp(h1, h2)
X  history	   *h1, *h2;
X
X--- 79,87 -----
X  }
X  
X  /*
X! **	histcmp: history comparison function for history file ordering
X! **		best win average, best point average, best avgturn, then alphabetic
X! **	NOTE: this is not the same order as ranking order
X  */
X  histcmp(h1, h2)
X  history	   *h1, *h2;
X***************
X*** 87,94
X  {
X  	double	v1, v2, diff;
X  
X! 	v1 = h1->h_games == 0 ? 0 : (h1->h_wins / h1->h_games);
X! 	v2 = h2->h_games == 0 ? 0 : (h2->h_wins / h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X  	v1 = h1->h_games == 0 ? 0 : (h1->h_points / h1->h_games);
X
X--- 88,95 -----
X  {
X  	double	v1, v2, diff;
X  
X! 	v1 = h1->h_games == 0 ? 0 : (h1->h_wins / (double)h1->h_games);
X! 	v2 = h2->h_games == 0 ? 0 : (h2->h_wins / (double)h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X  	v1 = h1->h_games == 0 ? 0 : (h1->h_points / (double)h1->h_games);
X***************
X*** 91,98
X  	v2 = h2->h_games == 0 ? 0 : (h2->h_wins / h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X! 	v1 = h1->h_games == 0 ? 0 : (h1->h_points / h1->h_games);
X! 	v2 = h2->h_games == 0 ? 0 : (h2->h_points / h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X  	v1 = h1->h_games == 0 ? 0 : (h1->h_avgturn / h1->h_games);
X
X--- 92,99 -----
X  	v2 = h2->h_games == 0 ? 0 : (h2->h_wins / (double)h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X! 	v1 = h1->h_games == 0 ? 0 : (h1->h_points / (double)h1->h_games);
X! 	v2 = h2->h_games == 0 ? 0 : (h2->h_points / (double)h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X  	v1 = h1->h_games == 0 ? 0 : (h1->h_avgturn / (double)h1->h_games);
X***************
X*** 95,102
X  	v2 = h2->h_games == 0 ? 0 : (h2->h_points / h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X! 	v1 = h1->h_games == 0 ? 0 : (h1->h_avgturn / h1->h_games);
X! 	v2 = h2->h_games == 0 ? 0 : (h2->h_avgturn / h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X  	return strncmp(h1->h_id, h2->h_id, IDLEN);
X
X--- 96,103 -----
X  	v2 = h2->h_games == 0 ? 0 : (h2->h_points / (double)h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X! 	v1 = h1->h_games == 0 ? 0 : (h1->h_avgturn / (double)h1->h_games);
X! 	v2 = h2->h_games == 0 ? 0 : (h2->h_avgturn / (double)h2->h_games);
X  	if((diff = v2 - v1) != 0)		/* reversed */
X  		return diff < 0 ? -1 : 1;
X  	return strncmp(h1->h_id, h2->h_id, IDLEN);
X
XIndex: random.c
XPrereq: 1.1
X*** random.c.orig	Wed Jun 15 13:57:44 1988
X--- random.c	Wed Jun 15 13:57:45 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)random.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<sys/types.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)random.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<sys/types.h>
X
XIndex: risk.c
XPrereq: 1.1
X*** risk.c.orig	Wed Jun 15 13:57:50 1988
X--- risk.c	Wed Jun 15 13:57:52 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)risk.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	"cubes.h"
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)risk.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	"cubes.h"
X***************
X*** 103,109
X  	xpct = expect(&temp);
X  
X  	/*
X! 	**	Player's temperment will chose which diceset to use.
X  	**	If p_temper returns True, it means roll again.
X  	*/
X  	if((*plr[comp].p_temper)(comp, stay, xpct, &modi) == True)
X
X--- 103,109 -----
X  	xpct = expect(&temp);
X  
X  	/*
X! 	**	Player's temperament will chose which diceset to use.
X  	**	If p_temper returns True, it means roll again.
X  	*/
X  	if((*plr[comp].p_temper)(comp, stay, xpct, &modi) == True)
X***************
X*** 266,274
X  	hesitate();
X  
X  	/*
X! 	**	If this computer has no score, and is not the COMP computer,
X! 	**	then if the leader is more than a quarter of the way to winning,
X! 	**	there's a 25% chance that this computer will quit the game.
X  	*/
X  	if(plr[comp].p_score == 0 && strcmp(plr[comp].p_name, compname[0]) != 0) {
X  		if(dieroll(12) > 8 && highscore(comp) > WINSCORE / 4) {
X
X--- 266,274 -----
X  	hesitate();
X  
X  	/*
X! 	**	If this non-proxy computer is not on board, and is not the COMP
X! 	**	computer, then 25% of the time, check to see if the leader is
X! 	**	more than WINSCORE/4 points ahead.  If so, quit.
X  	*/
X  	if(plr[comp].p_id == '\0' && plr[comp].p_onboard == False) {
X  		if(strcmp(plr[comp].p_name, compname[0]) != 0 && dieroll(12) > 8) {
X***************
X*** 270,279
X  	**	then if the leader is more than a quarter of the way to winning,
X  	**	there's a 25% chance that this computer will quit the game.
X  	*/
X! 	if(plr[comp].p_score == 0 && strcmp(plr[comp].p_name, compname[0]) != 0) {
X! 		if(dieroll(12) > 8 && highscore(comp) > WINSCORE / 4) {
X! 			oldplayer(comp);
X! 			return -1;
X  		}
X  	}
X  
X
X--- 270,281 -----
X  	**	computer, then 25% of the time, check to see if the leader is
X  	**	more than WINSCORE/4 points ahead.  If so, quit.
X  	*/
X! 	if(plr[comp].p_id == '\0' && plr[comp].p_onboard == False) {
X! 		if(strcmp(plr[comp].p_name, compname[0]) != 0 && dieroll(12) > 8) {
X! 			if(highscore(comp) - plr[comp].p_score > WINSCORE / 4) {
X! 				oldplayer(comp);
X! 				return -1;
X! 			}
X  		}
X  	}
X  
X
XIndex: screen.c
XPrereq: 1.1
X*** screen.c.orig	Wed Jun 15 13:57:58 1988
X--- screen.c	Wed Jun 15 13:57:58 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)screen.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)screen.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X***************
X*** 716,720
X  	(void) ioctl(_tty_ch, TIOCSETN, &_tty);
X  	tputs(TI, 0, outc);
X  	tputs(VS, 0, outc);
X  	(void) WREFRESH(curscr);
X  }
X
X--- 716,721 -----
X  	(void) ioctl(_tty_ch, TIOCSETN, &_tty);
X  	tputs(TI, 0, outc);
X  	tputs(VS, 0, outc);
X+ 	touchwin(curscr);
X  	(void) WREFRESH(curscr);
X  }
X
XIndex: strategies.c
XPrereq: 1.1
X*** strategies.c.orig	Wed Jun 15 13:58:03 1988
X--- strategies.c	Wed Jun 15 13:58:04 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)strategies.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	"cubes.h"
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)strategies.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	"cubes.h"
X***************
X*** 174,180
X  /*
X  **	pickstrategy: personalize each computer player
X  **		proxy players get the fickle strategy
X! **		calls picktemper to choose player temperment
X  */
X  pickstrategy(c)
X  int		c;
X
X--- 174,180 -----
X  /*
X  **	pickstrategy: personalize each computer player
X  **		proxy players get the fickle strategy
X! **		calls picktemper to choose player temperament
X  */
X  pickstrategy(c)
X  int		c;
X***************
X*** 183,189
X  	register char  *name;
X  
X  	/*
X! 	**	First, elect the player temperment.
X  	*/
X  	picktemper(c);
X  
X
X--- 183,189 -----
X  	register char  *name;
X  
X  	/*
X! 	**	First, elect the player temperament.
X  	*/
X  	picktemper(c);
X  
X
XIndex: tactics.c
XPrereq: 1.1
X*** tactics.c.orig	Wed Jun 15 13:58:08 1988
X--- tactics.c	Wed Jun 15 13:58:10 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)tactics.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	"cubes.h"
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)tactics.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	"cubes.h"
X
XIndex: tempers.c
XPrereq: 1.1
X*** tempers.c.orig	Wed Jun 15 13:58:14 1988
X--- tempers.c	Wed Jun 15 13:58:15 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)tempers.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	"cubes.h"
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)tempers.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	"cubes.h"
X***************
X*** 238,244
X  int		tempers	= sizeof temper / sizeof temper[0];
X  
X  /*
X! **	schizo: pick another temperment randomly!
X  **		for proxy players only
X  */
X  static boolean
X
X--- 238,244 -----
X  int		tempers	= sizeof temper / sizeof temper[0];
X  
X  /*
X! **	schizo: pick another temperament randomly!
X  **		for proxy players only
X  */
X  static boolean
X***************
X*** 256,262
X  
X  /*
X  **	picktemper: personalize each computer player
X! **		proxy players get the schizo temperment
X  */
X  picktemper(c)
X  int		c;
X
X--- 256,262 -----
X  
X  /*
X  **	picktemper: personalize each computer player
X! **		proxy players get the schizo temperament
X  */
X  picktemper(c)
X  int		c;
X***************
X*** 265,271
X  	register char  *name;
X  
X  	/*
X! 	**	Proxies get a schizo temperment in order to emulate humans.
X  	*/
X  	if(plr[c].p_id[0] != '\0') {
X  		plr[c].p_temper = schizo;
X
X--- 265,271 -----
X  	register char  *name;
X  
X  	/*
X! 	**	Proxies get a schizo temperament in order to emulate humans.
X  	*/
X  	if(plr[c].p_id[0] != '\0') {
X  		plr[c].p_temper = schizo;
X***************
X*** 273,279
X  	}
X  
X  	/*
X! 	**	Match a name to a temperment.
X  	*/
X  	name = plr[c].p_name;
X  	for(n = 0;n < compnames;++n) {
X
X--- 273,279 -----
X  	}
X  
X  	/*
X! 	**	Match a name to a temperament.
X  	*/
X  	name = plr[c].p_name;
X  	for(n = 0;n < compnames;++n) {
X
XIndex: turn.c
XPrereq: 1.1
X*** turn.c.orig	Wed Jun 15 13:58:17 1988
X--- turn.c	Wed Jun 15 13:58:18 1988
X***************
X*** 1,6
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)turn.c 1.1 6/2/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
X--- 1,6 -----
X  /*	vi:set sw=4 ts=4: */
X  #ifndef	lint
X! static char	sccsid[] = "@(#)turn.c 2.1 6/15/88 Copyright 1988 Gregory M. Paris";
X  #endif	lint
X  
X  #include	<stdio.h>
X
X
X-- 
XGreg Paris                         <gmp@rayssd.ray.com>
X {att,decuac,gatech,necntc,sun,uiucdcs,ukma}!rayssd!gmp
XDon't look on the carpet; I threw something awful on it.
X
X
END_OF_cubes.pch1
if test 36850 -ne `wc -c <cubes.pch1`; then
    echo shar: \"cubes.pch1\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0