[net.sources.games] TKO Boxing Game

gancarz@decvax.UUCP (Mike Gancarz) (02/14/86)

[ Donate this line to net.charity ]

Following is a boxing simulation game I'd written in one of my first bouts
with the C language.  TKO lets you match up any two opponents in boxing
history for a 3 to 15 round slugfest.  It even includes fictitious
fighters such Rocky Balboa and Mr. T.  It prints a round-by-round description
of the fight: punches thrown, punches missed, clinches, knockdowns, knockouts,
injuries, and, of course, TKO's.  It accounts for such factors as fighters'
hit power, chin, defense, aggressiveness, recoverability, resistance to cuts,
endurance, and much more.  To make the scene more realistic, the speed of the
printout is altered whenever the action heats up.  Scoring is by the rounds
system, and the referee has a say in the scoring.  You can even pit a boxer
against himself.  (Can Marvin Hagler take what Marvin Hagler can dish out?)

Alas, any good boxing simulation requires LOTS of data.  I've only had time
to fill in data for the more popular weight classes, although other weight
classes are supported.  If you feel so inclined to add more data to 'names.c',
please do so and mail me the changes.  But note that seemingly small
alterations in the data can have disastrous consequences in the outcome of a
given fight.

BTW, we've found that, although Muhammad Ali is the greatest heavyweight
*boxer* of all time, and Joe Louis is the greatest *boxer-puncher* of all time,
and Rocky Marciano is the greatest *slugger* of all time...Jack Dempsey has
survived more heavyweight tournaments we've staged than everyone else, even
though he OUGHT to lose to any of the foregoing according to the statistics.
You figure it out.

Enjoy.

-- Mike Gancarz, DEC Ultrix Engineering Group, Merrimack, NH
*************************************************************************
* This software is not to be construed as a commitment by Digital, etc. *
*************************************************************************


<<----------------------------CUT HERE--------------------------------->>
# This is a shell archive.  Remove anything before this line, then
# unpack it by saving it in a file and typing "sh file".  (Files
# unpacked will be owned by you and have default permissions.)
#
# This archive contains:
# Makefile copyright.txt def.h extern.h names.c stat subs1.c subs2.c tables.c tko.c

echo x - Makefile
cat > "Makefile" << '//E*O*F Makefile//'
CFLAGS = -O
tko:	tko.o names.o subs1.o subs2.o tables.o
	cc $(CFLAGS) tko.o names.o subs1.o subs2.o tables.o -o tko
	chmod 0700 tko
tko.o: def.h extern.h tko.c
	cc -c $(CFLAGS) tko.c
names.o: def.h extern.h names.c
	cc -c $(CFLAGS) names.c
subs1.o: def.h extern.h subs1.c
	cc -c $(CFLAGS) subs1.c
subs2.o: def.h extern.h subs2.c
	cc -c $(CFLAGS) subs2.c
tables.o: def.h extern.h tables.c
	cc -c $(CFLAGS) tables.c
//E*O*F Makefile//

echo x - copyright.txt
cat > "copyright.txt" << '//E*O*F copyright.txt//'

/*
Copyright (c) 1979  Mike Gancarz
Permission is hereby granted to freely distribute, copy, modify and otherwise
use this software for nonprofit purposes as long as this copyright appears
in the file and remains intact.
*/
//E*O*F copyright.txt//

echo x - def.h
cat > "def.h" << '//E*O*F def.h//'
/*
Copyright (c) 1979  Mike Gancarz
Permission is hereby granted to freely distribute, copy, modify and otherwise
use this software for nonprofit purposes as long as this copyright appears
in the file and remains intact.
*/

#include <stdio.h>
#include <signal.h>
#include <sgtty.h>
/*
#define DEBUG 1	
*/

#define NAMSIZ 20	/* number of characters in name */
#define NROUNDS 15	/* number of rounds in the fight */
#define LINE 80
#define YES 1
#define NO 0
#define HARD 1		/* severity of punch */
#define SOFT 0		/*    "     "    "   */
#define NOKILL -1	/* killer instinct not in effect */
#define NOKD 0		/* no knockdown */
#define OFFNAME		bx[rt[offense].bxptr].lname
#define DEFNAME		bx[rt[flip(offense)].bxptr].lname
#define BX0NAM		bx[rt[0].bxptr].lname
#define BX1NAM		bx[rt[1].bxptr].lname
#define CUTNAM		bx[rt[i].bxptr].lname
#define RTOFF		rt[offense]
#define RTDEF		rt[flip(offense)]
#define BXOFF		bx[rt[offense].bxptr]
#define BXDEF		bx[rt[flip(offense)].bxptr]
#define BXI		bx[rt[i].bxptr]
#define J1WIN		(rt[0].cj1scr > rt[1].cj1scr ? 0 : 1)
#define J2WIN		(rt[0].cj2scr > rt[1].cj2scr ? 0 : 1)
#define REFWIN		(rt[0].crscr > rt[1].crscr ? 0 : 1)
#define J1WSCR		rt[(rt[0].cj1scr > rt[1].cj1scr ? 0 : 1)].cj1scr
#define J2WSCR		rt[(rt[0].cj2scr > rt[1].cj2scr ? 0 : 1)].cj2scr
#define REFWSCR		rt[(rt[0].crscr > rt[1].crscr ? 0 : 1)].crscr
#define J1LSCR		rt[(rt[0].cj1scr > rt[1].cj1scr ? 1 : 0)].cj1scr
#define J2LSCR		rt[(rt[0].cj2scr > rt[1].cj2scr ? 1 : 0)].cj2scr
#define REFLSCR		rt[(rt[0].crscr > rt[1].crscr ? 1 : 0)].crscr
#define CARD		act[ccard]
#define LCARD		act[lcard]
#define toupper(c)	(islower(c) ? ((c) - ('a' - 'A')) : (c))
#define islower(c)	('a' <= (c) && (c) <= 'z')
#define iswhite(c)	((c) <= ' ' || 0177 <= (c)) /* ASCII ONLY */
#define rnd80		((rand() % 80) + 1)
#define flip(n)		(n ? 0 : 1)

typedef char byte;
//E*O*F def.h//

echo x - extern.h
cat > "extern.h" << '//E*O*F extern.h//'
/*
Copyright (c) 1979  Mike Gancarz
Permission is hereby granted to freely distribute, copy, modify and otherwise
use this software for nonprofit purposes as long as this copyright appears
in the file and remains intact.
*/

/** boxing action card **/
extern struct action{
	byte	acrp;		/* ring position */
	char	acrpchk;	/* check ring position */
	byte	accf;		/* control factor */
	char	achand;		/* left- or right-hand punch */
	byte	accutk;		/* check for cuts or knockdowns */
	byte	acpunch;	/* punch number */
	byte	ackd;		/* knockdown attempt */
	byte	ackdr;		/* knockdown rating */
	byte	ackor;		/* knockout rating */
	char	acj1;		/* judge 1 scoring */
	char	acj2;		/* judge 2 scoring */
	char	acref;		/* referee scoring */
};
extern struct action act[81];

/** boxer table **/
extern struct boxer{
	char	fname[NAMSIZ];	/* boxer's first name */
	char	mname[NAMSIZ];	/* boxer's middle name */
	char	lname[NAMSIZ];	/* boxer's last name */
	byte	rating;		/* overall rating */
	char	style;		/* style */
	byte	weight;		/* weight class */
	byte	cfb;		/* control factor against a boxer */
	byte	cfs;		/* control factor against a slugger */
	byte	hp;		/* hit power */
	byte	ki;		/* killer instinct */
	byte	kdr1;		/* knockdown rating 1 */
	byte	kdr2;		/* knockdown rating 2 */
	byte	kor;		/* knockout rating */
	byte	co;		/* cut opponent rating */
	byte	ch;		/* cut himself rating */
	byte	tko;		/* technical knockout rating */
	byte	agg;		/* aggressiveness rating */
	byte	end;		/* 10-round endurance */
	byte	def;		/* defense rating */
	byte	fi;		/* fighting inside strategy available */
	byte	fo;		/* fighting outside strategy available */
	byte	cu;		/* cover-up strategy available */
	byte	ko;		/* knockout strategy available */
	byte	pl;		/* punches landed upper limit */
	byte	pm;		/* punches missed upper limit */
	byte	cl;		/* clinching upper limit */
	byte	foul;		/* foul rating */
	byte	jab3;		/* 3-point jab upper limit */
	byte	jab2;		/* 2-point jab upper limit */
	byte	hook3;		/* 3-point hook upper limit */
	byte	hook2;		/* 2-point hook upper limit */
	byte	cross3;		/* 3-point cross upper limit */
	byte	cross2;		/* 2-point cross upper limit */
	byte	combo3;		/* 3-point combination upper limit */
	byte	combo2;		/* 2-point combination upper limit */
	byte	upper3;		/* 3-point uppercut upper limit */
	byte	icor;		/* in corner/on ropes adjustment factor */
};
extern struct boxer bx[];

/** run-time statistics **/
extern struct rtstat{
	int	bxptr;		/* pointer to bx[] structure offset */
	byte	ccf;		/* current control factor */
	byte	chp;		/* current hit power */
	byte	ckdr1;		/* current knockdown rating 1 */
	byte	cagg;		/* current aggressiveness rating */
	int	cend;		/* amount of endurance left */
	byte	cdef;		/* current defense rating */
	byte	cpl;		/* current punches landed upper limit */
	byte	cnpm;		/* current number of punches missed */
	byte	cnpts;		/* current number of points */
	byte	catko1;		/* auto-tko score from previous round */
	byte	catko2;		/* auto-tko score from previous round */
	byte	cncpts;		/* current number of cut points */
	byte	pncpts;		/* previous number of cut points */
	byte	cpv3;		/* current punch value of 3-point punches */
	byte	cpv2;		/* current punch value of 2-point punches */
	byte	cj1scr;		/* current judge #1 score */
	byte	cj2scr;		/* current judge #2 score */
	byte	crscr;		/* current referee score */
	byte	ckdflg;		/* current knockdown flag */
};
extern struct rtstat rt[2];

extern byte kdtab[200];
extern byte cuttab[90];
extern byte atko[15];

extern savegm();

extern int nboxers;	/* number of boxers in the names file */
extern int nrounds;	/* number of rounds in the fight */
extern int round;	/* current round number */
extern int a;		/* boxer a  bx[] offset */
extern int b;		/* boxer b bx[] offset */
extern int fagg;	/* fight aggressor */
extern int offense;	/* fighter on offense */
extern int actcnt;	/* boxing action card counter */
extern int ccard;	/* current boxing action card */
extern int lcard;	/* last boxing action card */
extern byte killer;	/* killer instinct flag */
extern byte kdcount;	/* knockdown count */
extern byte deck;	/* which half of boxing act. card deck is being used */
extern char *wc[12];	/* weight classes */
extern byte w;		/* weight class for this fight */
extern int speed;	/* speed at which the fight will take place */
extern char temp[LINE];	/* temporary string buffer */
extern int cused[80];	/* boxing action cards already used this round */
extern char ptype[20];	/* verbal description of type of punch landed */
//E*O*F extern.h//

echo x - names.c
cat > "names.c" << '//E*O*F names.c//'

/**********************************************************
 *							  *
 *                  TKO -- The Boxing Game		  *
 *							  *
 **********************************************************/

/*
Copyright (c) 1979  Mike Gancarz
Permission is hereby granted to freely distribute, copy, modify and otherwise
use this software for nonprofit purposes as long as this copyright appears
in the file and remains intact.
*/


#include "def.h"


/** boxer table **/
struct boxer{
	char	fname[NAMSIZ];	/* boxer's first name */
	char	mname[NAMSIZ];	/* boxer's middle name */
	char	lname[NAMSIZ];	/* boxer's last name */
	byte	rating;		/* overall rating */
	char	style;		/* style */
	byte	weight;		/* weight class */
	byte	cfb;		/* control factor against a boxer */
	byte	cfs;		/* control factor against a slugger */
	byte	hp;		/* hit power */
	byte	ki;		/* killer instinct */
	byte	kdr1;		/* knockdown rating 1 */
	byte	kdr2;		/* knockdown rating 2 */
	byte	kor;		/* knockout rating */
	byte	co;		/* cut opponent rating */
	byte	ch;		/* cut himself rating */
	byte	tko;		/* technical knockout rating */
	byte	agg;		/* aggressiveness rating */
	byte	end;		/* 10-round endurance */
	byte	def;		/* defense rating */
	byte	fi;		/* fighting inside strategy available */
	byte	fo;		/* fighting outside strategy available */
	byte	cu;		/* cover-up strategy available */
	byte	ko;		/* knockout strategy available */
	byte	pl;		/* punches landed upper limit */
	byte	pm;		/* punches missed upper limit */
	byte	cl;		/* clinching upper limit */
	byte	foul;		/* foul rating */
	byte	jab3;		/* 3-point jab upper limit */
	byte	jab2;		/* 2-point jab upper limit */
	byte	hook3;		/* 3-point hook upper limit */
	byte	hook2;		/* 2-point hook upper limit */
	byte	cross3;		/* 3-point cross upper limit */
	byte	cross2;		/* 2-point cross upper limit */
	byte	combo3;		/* 3-point combination upper limit */
	byte	combo2;		/* 2-point combination upper limit */
	byte	upper3;		/* 3-point uppercut upper limit */
	byte	icor;		/* in corner/on ropes adjustment factor */
} bx[] = {
	"Muhammad",	/* boxer's first name */
	"\0",		/* boxer's middle name */
	"Ali",		/* boxer's last name */
	12,		/* overall rating */
	'b',		/* style */
	1,		/* weight class */
	12,		/* control factor against a boxer */
	12,		/* control factor against a slugger */
	7,		/* hit power */
	6,		/* killer instinct */
	1,		/* knockdown rating 1 */
	0,		/* knockdown rating 2 */
	1,		/* knockout rating */
	7,		/* cut opponent rating */
	1,		/* cut himself rating */
	2,		/* technical knockout rating */
	6,		/* aggressiveness rating */
	110,		/* 10-round endurance */
	-6,		/* defense rating */
	1,		/* fighting inside strategy available */
	4,		/* fighting outside strategy available */
	2,		/* cover-up strategy available */
	2,		/* knockout strategy available */
	46,		/* punches landed upper limit */
	60,		/* punches missed upper limit */
	67,		/* clinching upper limit */
	0,		/* foul rating */
	19,		/* 3-point jab upper limit */
	24,		/* 2-point jab upper limit */
	33,		/* 3-point hook upper limit */
	35,		/* 2-point hook upper limit */
	44,		/* 3-point cross upper limit */
	46,		/* 2-point cross upper limit */
	64,		/* 3-point combination upper limit */
	69,		/* 2-point combination upper limit */
	78,		/* 3-point uppercut upper limit */
	0,		/* in corner/on ropes adjustment factor */

	"Vito",
	"\0",
	"Antuofermo",
	8,
	'e',
	3,
	10,
	10,
	8,
	7,
	3,
	2,
	2,
	5,
	6,
	3,
	8,
	80,
	2,
	2,
	1,
	2,
	3,
	39,
	62,
	70,
	1,
	5,
	13,
	21,
	33,
	41,
	53,
	61,
	73,
	76,
	2,

	"Art",
	"\0",
	"Aragon",
	7,
	'b',
	5,
	10,
	9,
	6,
	6,
	3,
	2,
	2,
	5,
	5,
	3,
	7,
	85,
	0,
	2,
	2,
	2,
	2,
	41,
	61,
	69,
	0,
	8,
	20,
	28,
	40,
	45,
	53,
	61,
	73,
	76,
	2,

	"Joey",
	"\0",
	"Archer",
	7,
	'b',
	3,
	9,
	10,
	6,
	4,
	3,
	2,
	2,
	6,
	3,
	3,
	7,
	85,
	-4,
	1,
	2,
	3,
	1,
	41,
	61,
	69,
	1,
	4,
	21,
	24,
	36,
	39,
	51,
	56,
	73,
	74,
	2,

	"Alexis",
	"\0",
	"Arguello",
	10,
	'e',
	8,
	11,
	10,
	9,
	8,
	3,
	2,
	2,
	6,
	3,
	2,
	9,
	90,
	2,
	2,
	2,
	2,
	3,
	41,
	63,
	70,
	1,
	14,
	17,
	30,
	33,
	47,
	50,
	64,
	67,
	76,
	2,

	"Henry",
	"\0",
	"Armstrong",
	11,
	's',
	5,
	10,
	11,
	9,
	9,
	3,
	1,
	1,
	6,
	4,
	2,
	10,
	100,
	0,
	2,
	2,
	2,
	3,
	39,
	61,
	69,
	1,
	8,
	10,
	24,
	28,
	42,
	46,
	60,
	63,
	77,
	0,

	"Mike",
	"\0",
	"Ayala",
	7,
	's',
	10,
	9,
	9,
	8,
	6,
	3,
	1,
	3,
	6,
	3,
	3,
	8,
	80,
	0,
	3,
	3,
	1,
	1,
	41,
	62,
	70,
	1,
	8,
	20,
	25,
	33,
	42,
	54,
	59,
	67,
	72,
	2,

	"Billy",
	"\0",
	"Backus",
	4,
	'e',
	4,
	8,
	7,
	7,
	6,
	3,
	3,
	4,
	5,
	6,
	3,
	8,
	80,
	2,
	2,
	1,
	2,
	2,
	37,
	61,
	69,
	1,
	4,
	22,
	23,
	29,
	34,
	51,
	52,
	58,
	63,
	2,

	"Buddy",
	"\0",
	"Baer",
	7,
	's',
	1,
	9,
	8,
	9,
	7,
	3,
	2,
	2,
	5,
	4,
	4,
	9,
	75,
	5,
	2,
	2,
	2,
	2,
	38,
	65,
	72,
	2,
	7,
	12,
	24,
	31,
	42,
	50,
	57,
	62,
	73,
	3,

	"Max",
	"\0",
	"Baer",
	9,
	's',
	1,
	9,
	11,
	10,
	8,
	2,
	3,
	2,
	6,
	3,
	3,
	8,
	90,
	0,
	2,
	3,
	1,
	3,
	39,
	65,
	71,
	1,
	7,
	12,
	23,
	30,
	45,
	56,
	67,
	74,
	78,
	3,

	"Carmen",
	"\0",
	"Basilio",
	9,
	'e',
	5,
	10,
	10,
	8,
	8,
	3,
	1,
	2,
	6,
	4,
	2,
	9,
	90,
	-2,
	3,
	2,
	2,
	2,
	41,
	61,
	69,
	1,
	12,
	19,
	26,
	31,
	42,
	50,
	57,
	62,
	73,
	1,

	"Wilfredo",
	"\0",
	"Benitez",
	10,
	'b',
	5,
	10,
	10,
	7,
	5,
	3,
	1,
	1,
	6,
	3,
	2,
	8,
	90,
	-4,
	2,
	4,
	2,
	2,
	43,
	60,
	68,
	0,
	11,
	27,
	32,
	40,
	45,
	53,
	61,
	73,
	76,
	1,

	"Willie",
	"\0",
	"Besmanoff",
	1,
	'b',
	1,
	7,
	7,
	5,
	3,
	7,
	3,
	5,
	4,
	6,
	4,
	6,
	75,
	4,
	1,
	3,
	2,
	0,
	38,
	63,
	70,
	1,
	0,
	24,
	24,
	40,
	40,
	48,
	48,
	72,
	72,
	3,

	"Jurgin",
	"\0",
	"Blin",
	4,
	'b',
	1,
	9,
	8,
	5,
	4,
	5,
	3,
	4,
	4,
	5,
	4,
	7,
	75,
	0,
	1,
	2,
	3,
	1,
	39,
	62,
	70,
	1,
	0,
	16,
	16,
	32,
	32,
	48,
	48,
	72,
	72,
	2,

	"Duane",
	"\0",
	"Bobick",
	4,
	's',
	1,
	8,
	8,
	8,
	6,
	6,
	3,
	5,
	5,
	6,
	4,
	8,
	80,
	6,
	2,
	2,
	1,
	3,
	38,
	63,
	70,
	1,
	3,
	7,
	15,
	27,
	32,
	40,
	48,
	60,
	68,
	3,

	"Oscar",
	"\0",
	"Bonavena",
	8,
	's',
	1,
	9,
	10,
	8,
	7,
	2,
	3,
	1,
	5,
	3,
	1,
	9,
	95,
	4,
	3,
	1,
	1,
	3,
	38,
	63,
	71,
	1,
	3,
	7,
	18,
	34,
	42,
	54,
	59,
	67,
	72,
	3,

	"Johnny",
	"\0",
	"Boudreaux",
	1,
	'b',
	1,
	7,
	7,
	5,
	4,
	6,
	4,
	5,
	4,
	6,
	4,
	6,
	75,
	4,
	1,
	3,
	2,
	1,
	38,
	62,
	69,
	0,
	0,
	16,
	16,
	32,
	32,
	48,
	48,
	72,
	72,
	2,

	"James",
	"\0",
	"Braddock",
	6,
	'b',
	1,
	9,
	8,
	6,
	4,
	2,
	2,
	2,
	5,
	4,
	3,
	7,
	85,
	-4,
	1,
	3,
	3,
	1,
	38,
	60,
	68,
	0,
	0,
	16,
	0,
	32,
	0,
	48,
	0,
	64,
	0,
	1,

	"Primo",
	"\0",
	"Carnera",
	3,
	's',
	1,
	8,
	8,
	7,
	5,
	6,
	4,
	5,
	4,
	5,
	2,
	7,
	85,
	5,
	2,
	2,
	1,
	2,
	37,
	64,
	72,
	2,
	4,
	21,
	24,
	36,
	39,
	51,
	52,
	58,
	63,
	4,

	"Rubin",
	"\0",
	"Carter",
	8,
	's',
	3,
	8,
	10,
	10,
	8,
	3,
	1,
	2,
	5,
	5,
	2,
	9,
	85,
	4,
	2,
	2,
	1,
	3,
	37,
	62,
	70,
	1,
	7,
	12,
	23,
	30,
	45,
	56,
	67,
	74,
	78,
	2,

	"Roberto",
	"\0",
	"Castanon",
	7,
	's',
	10,
	8,
	9,
	8,
	5,
	3,
	1,
	2,
	5,
	5,
	3,
	9,
	85,
	2,
	2,
	2,
	2,
	2,
	39,
	63,
	70,
	1,
	8,
	20,
	25,
	33,
	44,
	60,
	65,
	73,
	76,
	3,

	"Ruben",
	"\0",
	"Castillo",
	7,
	's',
	10,
	9,
	9,
	9,
	8,
	5,
	2,
	4,
	5,
	4,
	3,
	9,
	80,
	2,
	2,
	2,
	2,
	3,
	39,
	62,
	70,
	1,
	9,
	11,
	30,
	35,
	53,
	58,
	67,
	69,
	78,
	3,

	"Marcel",
	"\0",
	"Cerdan",
	11,
	'e',
	3,
	10,
	10,
	10,
	8,
	2,
	1,
	2,
	6,
	3,
	2,
	9,
	95,
	-2,
	2,
	3,
	1,
	3,
	43,
	61,
	69,
	2,
	14,
	17,
	30,
	33,
	47,
	50,
	64,
	67,
	76,
	2,

	"Antonio",
	"\0",
	"Cervantes",
	9,
	'e',
	6,
	10,
	11,
	8,
	8,
	2,
	1,
	1,
	6,
	3,
	2,
	9,
	90,
	-2,
	2,
	2,
	2,
	3,
	43,
	61,
	69,
	1,
	11,
	18,
	29,
	36,
	47,
	54,
	65,
	72,
	76,
	2,

	"Ezzard",
	"\0",
	"Charles",
	10,
	'b',
	1,
	10,
	10,
	7,
	6,
	3,
	2,
	5,
	7,
	2,
	2,
	9,
	110,
	-4,
	1,
	4,
	1,
	2,
	46,
	60,
	68,
	0,
	14,
	17,
	30,
	33,
	47,
	50,
	64,
	67,
	76,
	1,

	"George",
	"\0",
	"Chuvalo",
	8,
	's',
	1,
	8,
	9,
	8,
	8,
	1,
	0,
	1,
	4,
	6,
	1,
	9,
	110,
	6,
	2,
	2,
	1,
	2,
	37,
	62,
	70,
	2,
	5,
	22,
	25,
	37,
	41,
	58,
	59,
	65,
	68,
	3,

	"Don",
	"\0",
	"Cockell",
	4,
	'e',
	1,
	8,
	8,
	6,
	4,
	4,
	3,
	4,
	4,
	6,
	3,
	7,
	85,
	0,
	2,
	2,
	2,
	2,
	39,
	61,
	69,
	1,
	5,
	22,
	25,
	37,
	40,
	52,
	56,
	73,
	74,
	1,

	"Gerrie",
	"\0",
	"Coetzee",
	6,
	's',
	1,
	8,
	8,
	8,
	5,
	3,
	2,
	2,
	5,
	4,
	3,
	8,
	85,
	2,
	2,
	2,
	1,
	2,
	38,
	63,
	70,
	1,
	1,
	7,
	12,
	29,
	34,
	51,
	55,
	73,
	74,
	2,

	"Henry",
	"\0",
	"Cooper",
	6,
	's',
	1,
	8,
	8,
	8,
	7,
	3,
	2,
	4,
	5,
	9,
	3,
	8,
	85,
	2,
	2,
	2,
	2,
	2,
	41,
	61,
	69,
	1,
	3,
	7,
	18,
	34,
	42,
	54,
	59,
	67,
	72,
	2,

	"Jim",
	"\0",
	"Corbett",
	9,
	'b',
	1,
	10,
	11,
	5,
	5,
	2,
	1,
	2,
	6,
	4,
	3,
	7,
	100,
	-5,
	2,
	3,
	2,
	1,
	45,
	60,
	68,
	0,
	4,
	21,
	26,
	43,
	46,
	58,
	59,
	65,
	68,
	0,

	"Pipino",
	"\0",
	"Cuevas",
	10,
	's',
	5,
	10,
	10,
	10,
	9,
	2,
	1,
	2,
	6,
	3,
	2,
	10,
	85,
	4,
	2,
	2,
	2,
	3,
	38,
	61,
	69,
	0,
	9,
	11,
	29,
	34,
	52,
	57,
	66,
	68,
	78,
	2,

	"Bruce",
	"\0",
	"Curry",
	7,
	'e',
	6,
	9,
	9,
	8,
	7,
	3,
	1,
	2,
	5,
	3,
	2,
	8,
	80,
	0,
	2,
	2,
	2,
	3,
	39,
	61,
	69,
	1,
	8,
	20,
	28,
	40,
	48,
	60,
	65,
	73,
	76,
	1,

	"Terry",
	"\0",
	"Daniels",
	4,
	'b',
	1,
	8,
	7,
	6,
	4,
	6,
	1,
	4,
	5,
	5,
	2,
	7,
	85,
	4,
	2,
	2,
	3,
	1,
	39,
	61,
	69,
	1,
	0,
	16,
	16,
	32,
	32,
	48,
	48,
	64,
	64,
	2,

	"Les",
	"\0",
	"Darcy",
	11,
	'e',
	3,
	10,
	11,
	8,
	7,
	1,
	1,
	1,
	6,
	3,
	2,
	8,
	95,
	-4,
	2,
	3,
	2,
	2,
	43,
	61,
	69,
	1,
	11,
	18,
	29,
	37,
	49,
	56,
	63,
	68,
	75,
	2,

	"Alberto",
	"\0",
	"Davila",
	8,
	'e',
	9,
	10,
	9,
	7,
	4,
	2,
	1,
	3,
	6,
	3,
	2,
	8,
	85,
	-2,
	2,
	3,
	2,
	1,
	43,
	62,
	69,
	0,
	10,
	26,
	34,
	46,
	49,
	53,
	61,
	73,
	76,
	2,

	"Howard",
	"\0",
	"Davis",
	6,
	'b',
	7,
	9,
	9,
	5,
	4,
	4,
	1,
	2,
	5,
	4,
	3,
	7,
	80,
	-2,
	2,
	2,
	2,
	2,
	39,
	61,
	69,
	1,
	0,
	16,
	16,
	40,
	40,
	48,
	48,
	72,
	72,
	1,

	"Esteban",
	"\0",
	"DeJesus",
	8,
	'b',
	7,
	10,
	10,
	8,
	6,
	3,
	1,
	2,
	5,
	4,
	3,
	9,
	85,
	0,
	2,
	2,
	2,
	2,
	41,
	62,
	70,
	1,
	5,
	13,
	22,
	34,
	39,
	47,
	55,
	67,
	72,
	2,

	"Mike",
	"\0",
	"DeJohn",
	5,
	's',
	1,
	8,
	8,
	9,
	6,
	5,
	3,
	4,
	5,
	6,
	3,
	9,
	80,
	2,
	1,
	2,
	2,
	4,
	39,
	62,
	70,
	0,
	1,
	7,
	12,
	29,
	34,
	51,
	55,
	73,
	74,
	2,

	"Tony",
	"\0",
	"DeMarco",
	7,
	'e',
	5,
	10,
	9,
	8,
	7,
	4,
	2,
	4,
	6,
	4,
	3,
	9,
	85,
	0,
	3,
	2,
	2,
	2,
	41,
	61,
	69,
	1,
	3,
	7,
	12,
	20,
	28,
	40,
	48,
	60,
	68,
	2,

	"Jack",
	"\0",
	"Dempsey",
	12,
	's',
	1,
	11,
	11,
	9,
	10,
	2,
	0,
	2,
	6,
	3,
	1,
	10,
	100,
	0,
	2,
	2,
	2,
	3,
	41,
	63,
	70,
	2,
	9,
	11,
	25,
	28,
	46,
	52,
	61,
	63,
	77,
	1,

	"Joe",
	"\0",
	"Dundee",
	6,
	'b',
	5,
	9,
	8,
	6,
	3,
	3,
	1,
	2,
	5,
	4,
	3,
	7,
	85,
	-2,
	2,
	2,
	2,
	1,
	41,
	61,
	69,
	0,
	5,
	22,
	25,
	37,
	40,
	52,
	56,
	73,
	74,
	1,

	"Roberto",
	"\0",
	"Duran",
	11,
	's',
	7,
	10,
	12,
	10,
	10,
	2,
	1,
	1,
	6,
	4,
	2,
	10,
	90,
	2,
	2,
	2,
	2,
	3,
	41,
	62,
	70,
	2,
	5,
	7,
	20,
	23,
	41,
	46,
	60,
	63,
	77,
	2,

	"Frank",
	"\0",
	"Durate",
	5,
	'e',
	9,
	8,
	8,
	8,
	6,
	3,
	3,
	3,
	5,
	5,
	3,
	8,
	75,
	0,
	2,
	2,
	1,
	3,
	38,
	63,
	70,
	1,
	3,
	15,
	20,
	37,
	41,
	58,
	61,
	73,
	74,
	3,

	"Jimmy",
	"\0",
	"Ellis",
	7,
	'b',
	1,
	10,
	8,
	6,
	4,
	2,
	2,
	4,
	6,
	2,
	3,
	7,
	95,
	-4,
	2,
	2,
	2,
	1,
	43,
	61,
	68,
	0,
	5,
	22,
	25,
	37,
	40,
	52,
	56,
	73,
	74,
	1,

	"Alfredo",
	"\0",
	"Evangelista",
	4,
	's',
	1,
	8,
	8,
	7,
	4,
	3,
	3,
	3,
	4,
	6,
	4,
	7,
	80,
	4,
	2,
	1,
	2,
	3,
	38,
	61,
	69,
	0,
	3,
	15,
	20,
	37,
	41,
	58,
	61,
	73,
	74,
	2,

	"Jackie",
	"\0",
	"Fields",
	9,
	'e',
	5,
	10,
	10,
	8,
	6,
	2,
	1,
	1,
	6,
	4,
	2,
	8,
	90,
	2,
	2,
	2,
	2,
	2,
	41,
	61,
	69,
	0,
	5,
	13,
	22,
	34,
	39,
	47,
	55,
	67,
	72,
	2,

	"Bob",
	"\0",
	"Fitzsimmons",
	10,
	'e',
	1,
	10,
	10,
	9,
	8,
	3,
	1,
	2,
	6,
	4,
	2,
	8,
	95,
	-2,
	3,
	3,
	0,
	3,
	43,
	62,
	70,
	1,
	15,
	25,
	32,
	37,
	44,
	49,
	64,
	74,
	78,
	1,

	"Tiger",
	"\0",
	"Flowers",
	8,
	'b',
	3,
	10,
	10,
	7,
	6,
	3,
	2,
	4,
	6,
	3,
	3,
	8,
	90,
	-4,
	2,
	2,
	2,
	2,
	41,
	60,
	69,
	2,
	8,
	20,
	28,
	40,
	45,
	53,
	61,
	73,
	76,
	1,

	"Zora",
	"\0",
	"Folley",
	6,
	'b',
	1,
	10,
	9,
	6,
	4,
	3,
	3,
	4,
	6,
	4,
	3,
	7,
	80,
	0,
	2,
	3,
	2,
	1,
	41,
	61,
	69,
	0,
	3,
	15,
	18,
	30,
	33,
	45,
	51,
	74,
	75,
	2,

	"George",
	"\0",
	"Foreman",
	9,
	's',
	1,
	9,
	11,
	10,
	9,
	3,
	1,
	3,
	6,
	2,
	2,
	10,
	70,
	4,
	2,
	3,
	1,
	3,
	41,
	63,
	70,
	0,
	5,
	7,
	20,
	23,
	41,
	46,
	60,
	63,
	77,
	2,

	"Mac",
	"\0",
	"Foster",
	7,
	's',
	1,
	8,
	10,
	9,
	7,
	3,
	3,
	3,
	6,
	4,
	2,
	9,
	95,
	4,
	2,
	2,
	1,
	3,
	39,
	64,
	70,
	0,
	8,
	20,
	22,
	26,
	37,
	53,
	61,
	73,
	76,
	2,

	"Joe",
	"\0",
	"Frazier",
	11,
	's',
	1,
	11,
	10,
	10,
	10,
	3,
	1,
	2,
	6,
	2,
	1,
	10,
	100,
	2,
	4,
	1,
	1,
	4,
	45,
	61,
	69,
	0,
	5,
	6,
	24,
	29,
	43,
	46,
	64,
	69,
	78,
	2,

	"Tony",
	"\0",
	"Galento",
	8,
	's',
	1,
	9,
	10,
	9,
	8,
	3,
	3,
	3,
	5,
	5,
	3,
	9,
	90,
	4,
	2,
	2,
	2,
	2,
	39,
	63,
	71,
	2,
	7,
	12,
	28,
	38,
	49,
	56,
	63,
	68,
	75,
	3,

	"Andy",
	"\0",
	"Ganigan",
	8,
	's',
	7,
	9,
	9,
	9,
	7,
	3,
	2,
	2,
	5,
	4,
	3,
	9,
	85,
	2,
	2,
	1,
	2,
	3,
	38,
	62,
	70,
	1,
	7,
	12,
	24,
	31,
	42,
	50,
	57,
	62,
	73,
	2,

	"Joe",
	"\0",
	"Gans",
	10,
	'e',
	7,
	11,
	11,
	8,
	6,
	2,
	1,
	3,
	6,
	4,
	2,
	8,
	95,
	-5,
	2,
	3,
	2,
	2,
	45,
	60,
	68,
	0,
	8,
	20,
	29,
	41,
	46,
	54,
	59,
	67,
	72,
	1,

	"Kid",
	"\0",
	"Gavilan",
	10,
	'e',
	5,
	10,
	10,
	8,
	8,
	2,
	1,
	1,
	6,
	3,
	2,
	9,
	95,
	0,
	2,
	2,
	2,
	3,
	43,
	61,
	69,
	1,
	7,
	12,
	19,
	24,
	40,
	50,
	57,
	62,
	73,
	1,

	"Mike",
	"\0",
	"Gibbons",
	10,
	'b',
	5,
	11,
	10,
	7,
	5,
	2,
	1,
	1,
	6,
	3,
	2,
	7,
	90,
	-6,
	2,
	3,
	2,
	1,
	43,
	59,
	67,
	0,
	10,
	26,
	34,
	46,
	49,
	53,
	61,
	73,
	76,
	0,

	"Tommy",
	"\0",
	"Gibbons",
	9,
	'b',
	3,
	10,
	10,
	7,
	6,
	2,
	1,
	1,
	6,
	2,
	2,
	8,
	95,
	-5,
	2,
	3,
	3,
	1,
	41,
	59,
	68,
	1,
	8,
	20,
	28,
	40,
	43,
	47,
	55,
	67,
	72,
	1,

	"Wilfredo",
	"\0",
	"Gomez",
	11,
	's',
	9,
	11,
	11,
	10,
	8,
	2,
	1,
	2,
	5,
	3,
	2,
	9,
	85,
	2,
	2,
	2,
	2,
	3,
	43,
	63,
	70,
	0,
	13,
	18,
	32,
	35,
	49,
	52,
	66,
	69,
	78,
	2,

	"Billy",
	"\0",
	"Graham",
	10,
	'e',
	5,
	10,
	10,
	8,
	7,
	2,
	1,
	1,
	6,
	2,
	2,
	8,
	90,
	-2,
	3,
	2,
	2,
	2,
	41,
	61,
	69,
	1,
	5,
	13,
	21,
	33,
	41,
	53,
	61,
	73,
	76,
	1,

	"Clyde",
	"\0",
	"Gray",
	6,
	'e',
	5,
	9,
	8,
	8,
	7,
	5,
	3,
	4,
	5,
	5,
	3,
	9,
	85,
	2,
	2,
	2,
	1,
	3,
	39,
	63,
	70,
	1,
	8,
	20,
	27,
	40,
	43,
	53,
	59,
	73,
	75,
	2,

	"Rocky",
	"\0",
	"Graziano",
	9,
	's',
	3,
	10,
	9,
	10,
	10,
	3,
	1,
	2,
	6,
	4,
	2,
	10,
	90,
	4,
	2,
	2,
	1,
	3,
	39,
	63,
	70,
	1,
	7,
	12,
	23,
	30,
	45,
	55,
	63,
	68,
	75,
	2,

	"Harry",
	"\0",
	"Greb",
	12,
	'e',
	3,
	11,
	11,
	8,
	9,
	1,
	1,
	1,
	6,
	3,
	2,
	10,
	95,
	-2,
	3,
	3,
	2,
	1,
	39,
	60,
	69,
	2,
	8,
	10,
	24,
	28,
	42,
	46,
	60,
	63,
	77,
	2,

	"Dave",
	"\0",
	"Green",
	9,
	's',
	5,
	10,
	9,
	8,
	8,
	3,
	2,
	3,
	6,
	4,
	2,
	9,
	85,
	0,
	2,
	2,
	2,
	3,
	41,
	61,
	69,
	0,
	7,
	12,
	23,
	30,
	45,
	55,
	63,
	68,
	75,
	2,

	"Emile",
	"\0",
	"Griffith",
	10,
	'b',
	3,
	11,
	11,
	6,
	6,
	3,
	1,
	2,
	6,
	3,
	2,
	8,
	90,
	-4,
	3,
	2,
	2,
	2,
	45,
	60,
	68,
	1,
	8,
	20,
	28,
	40,
	42,
	46,
	57,
	73,
	76,
	1,

	"Marvin",
	"\0",
	"Hagler",
	9,
	's',
	3,
	9,
	10,
	9,
	8,
	3,
	1,
	2,
	6,
	4,
	3,
	9,
	85,
	0,
	3,
	1,
	1,
	3,
	39,
	62,
	70,
	1,
	7,
	12,
	27,
	37,
	52,
	62,
	69,
	74,
	78,
	2,

	"Thomas",
	"\0",
	"Hearns",
	8,
	's',
	5,
	9,
	9,
	10,
	8,
	2,
	1,
	2,
	5,
	2,
	2,
	8,
	90,
	0,
	2,
	2,
	1,
	3,
	38,
	62,
	69,
	0,
	11,
	18,
	29,
	36,
	44,
	49,
	60,
	67,
	74,
	1,

	"Larry",
	"\0",
	"Holmes",
	8,
	'b',
	1,
	10,
	10,
	7,
	7,
	2,
	1,
	2,
	5,
	3,
	3,
	8,
	90,
	-2,
	1,
	3,
	3,
	1,
	43,
	61,
	69,
	0,
	11,
	27,
	32,
	40,
	48,
	60,
	65,
	73,
	76,
	1,

	"Maurice",
	"\0",
	"Hope",
	8,
	'e',
	4,
	9,
	10,
	8,
	8,
	4,
	2,
	2,
	5,
	4,
	3,
	9,
	85,
	0,
	2,
	2,
	2,
	2,
	41,
	62,
	70,
	1,
	11,
	18,
	29,
	36,
	47,
	54,
	65,
	72,
	76,
	1,

	"Beau",
	"\0",
	"Jack",
	9,
	'e',
	7,
	10,
	10,
	8,
	7,
	3,
	1,
	3,
	6,
	3,
	2,
	8,
	90,
	2,
	2,
	2,
	2,
	2,
	41,
	61,
	69,
	0,
	8,
	20,
	28,
	40,
	45,
	53,
	61,
	73,
	76,
	2,

	"Peter",
	"\0",
	"Jackson",
	11,
	'b',
	1,
	10,
	11,
	8,
	7,
	1,
	1,
	1,
	5,
	4,
	2,
	9,
	110,
	-5,
	2,
	3,
	2,
	2,
	45,
	60,
	69,
	0,
	12,
	19,
	26,
	31,
	42,
	50,
	57,
	62,
	73,
	1,

	"Joe",
	"\0",
	"Jeannette",
	11,
	'e',
	1,
	11,
	10,
	9,
	6,
	3,
	0,
	2,
	5,
	2,
	1,
	9,
	110,
	-4,
	3,
	2,
	3,
	1,
	43,
	60,
	69,
	0,
	7,
	12,
	24,
	31,
	42,
	50,
	57,
	62,
	73,
	1,

	"James",
	"\0",
	"Jeffries",
	11,
	's',
	1,
	10,
	11,
	9,
	8,
	1,
	1,
	1,
	5,
	2,
	1,
	9,
	110,
	4,
	3,
	3,
	0,
	3,
	43,
	62,
	70,
	0,
	7,
	12,
	23,
	30,
	45,
	56,
	60,
	62,
	73,
	2,

	"Ingemar",
	"\0",
	"Johannsson",
	7,
	's',
	1,
	9,
	9,
	9,
	7,
	3,
	3,
	4,
	5,
	3,
	3,
	9,
	85,
	2,
	2,
	2,
	2,
	2,
	43,
	61,
	69,
	0,
	8,
	20,
	22,
	26,
	37,
	53,
	61,
	73,
	76,
	1,

	"Jack",
	"\0",
	"Johnson",
	12,
	'b',
	1,
	12,
	12,
	7,
	6,
	2,
	0,
	2,
	5,
	1,
	3,
	7,
	95,
	-6,
	2,
	4,
	2,
	1,
	46,
	58,
	68,
	0,
	11,
	18,
	25,
	30,
	41,
	48,
	52,
	54,
	69,
	0,

	"Leroy",
	"\0",
	"Jones",
	6,
	's',
	1,
	9,
	8,
	8,
	7,
	3,
	2,
	3,
	5,
	4,
	3,
	9,
	85,
	6,
	2,
	2,
	1,
	3,
	38,
	64,
	71,
	1,
	5,
	13,
	21,
	33,
	44,
	60,
	65,
	73,
	76,
	4,

	"Ayub",
	"\0",
	"Kalule",
	7,
	'e',
	4,
	9,
	10,
	8,
	8,
	3,
	2,
	2,
	5,
	5,
	3,
	9,
	85,
	2,
	3,
	2,
	1,
	2,
	41,
	62,
	69,
	1,
	5,
	13,
	22,
	34,
	39,
	47,
	52,
	60,
	68,
	2,

	"Stanley",
	"\0",
	"Ketchel",
	11,
	's',
	3,
	11,
	11,
	10,
	10,
	3,
	1,
	2,
	6,
	4,
	2,
	10,
	95,
	0,
	2,
	2,
	2,
	3,
	41,
	61,
	69,
	2,
	7,
	12,
	23,
	30,
	45,
	55,
	63,
	68,
	75,
	2,

	"Mashashi",
	"\0",
	"Kudo",
	7,
	'b',
	4,
	10,
	10,
	7,
	5,
	3,
	2,
	3,
	5,
	3,
	3,
	8,
	85,
	-2,
	2,
	2,
	2,
	1,
	41,
	60,
	70,
	0,
	4,
	21,
	24,
	36,
	40,
	57,
	60,
	72,
	74,
	1,

	"Jake",
	"\0",
	"LaMotta",
	10,
	's',
	3,
	10,
	10,
	7,
	9,
	1,
	1,
	2,
	6,
	4,
	2,
	10,
	90,
	0,
	3,
	2,
	1,
	3,
	41,
	60,
	69,
	2,
	3,
	5,
	20,
	31,
	42,
	49,
	53,
	55,
	70,
	2,

	"Scott",
	"\0",
	"LeDoux",
	3,
	'e',
	1,
	9,
	7,
	7,
	4,
	5,
	4,
	4,
	4,
	5,
	3,
	7,
	75,
	6,
	3,
	0,
	2,
	2,
	37,
	65,
	71,
	1,
	0,
	16,
	16,
	32,
	32,
	48,
	48,
	72,
	72,
	3,

	"Benny",
	"\0",
	"Leonard",
	11,
	'e',
	7,
	11,
	12,
	8,
	7,
	3,
	1,
	1,
	6,
	3,
	2,
	8,
	90,
	-5,
	3,
	3,
	2,
	1,
	45,
	60,
	69,
	1,
	7,
	12,
	23,
	30,
	41,
	48,
	63,
	74,
	76,
	0,

	"Sugar",
	"Ray",
	"Leonard",
	7,
	'b',
	5,
	10,
	9,
	7,
	4,
	3,
	2,
	2,
	5,
	2,
	3,
	7,
	85,
	-2,
	1,
	3,
	2,
	1,
	41,
	61,
	69,
	1,
	6,
	21,
	27,
	36,
	41,
	51,
	57,
	73,
	75,
	1,

	"Sonny",
	"\0",
	"Liston",
	11,
	's',
	1,
	9,
	11,
	10,
	10,
	2,
	1,
	2,
	5,
	4,
	1,
	10,
	110,
	4,
	3,
	3,
	0,
	3,
	41,
	61,
	69,
	0,
	9,
	11,
	29,
	34,
	52,
	57,
	71,
	74,
	79,
	2,

	"Brian",
	"\0",
	"London",
	2,
	'e',
	1,
	8,
	7,
	7,
	3,
	6,
	4,
	5,
	4,
	8,
	5,
	7,
	70,
	4,
	2,
	2,
	2,
	2,
	39,
	61,
	69,
	1,
	0,
	16,
	16,
	40,
	40,
	56,
	56,
	72,
	72,
	2,

	"Joe",
	"\0",
	"Louis",
	12,
	'e',
	1,
	10,
	12,
	10,
	10,
	3,
	0,
	1,
	6,
	2,
	2,
	10,
	100,
	0,
	3,
	3,
	1,
	3,
	46,
	62,
	70,
	0,
	13,
	18,
	32,
	35,
	49,
	52,
	66,
	69,
	78,
	2,

	"Rudi",
	"\0",
	"Lubbers",
	2,
	'e',
	1,
	8,
	7,
	7,
	3,
	4,
	3,
	4,
	4,
	6,
	3,
	7,
	80,
	5,
	2,
	0,
	2,
	2,
	38,
	64,
	71,
	1,
	0,
	16,
	16,
	32,
	32,
	48,
	48,
	64,
	64,
	3,

	"Eddie",
	"\0",
	"Machen",
	8,
	'e',
	1,
	10,
	10,
	8,
	6,
	2,
	1,
	2,
	3,
	4,
	3,
	8,
	85,
	0,
	2,
	2,
	3,
	2,
	43,
	61,
	69,
	0,
	8,
	20,
	25,
	33,
	42,
	54,
	59,
	67,
	72,
	1,

	"Rocky",
	"\0",
	"Marciano",
	12,
	's',
	1,
	10,
	12,
	10,
	10,
	2,
	0,
	1,
	6,
	5,
	1,
	10,
	110,
	4,
	3,
	2,
	1,
	3,
	43,
	62,
	70,
	1,
	9,
	11,
	25,
	28,
	46,
	52,
	66,
	69,
	78,
	2,

	"Jeff",
	"\0",
	"Merritt",
	6,
	's',
	1,
	8,
	8,
	10,
	8,
	5,
	2,
	5,
	5,
	4,
	3,
	9,
	70,
	5,
	2,
	2,
	1,
	2,
	41,
	63,
	70,
	0,
	7,
	12,
	27,
	37,
	52,
	62,
	69,
	74,
	76,
	3,

	"Larry",
	"\0",
	"Middleton",
	5,
	'b',
	1,
	9,
	10,
	6,
	4,
	5,
	4,
	4,
	5,
	4,
	4,
	7,
	80,
	-4,
	2,
	3,
	2,
	1,
	39,
	59,
	68,
	0,
	5,
	22,
	25,
	37,
	40,
	52,
	56,
	73,
	74,
	1,

	"Carlos",
	"\0",
	"Monzon",
	12,
	's',
	3,
	11,
	11,
	9,
	8,
	1,
	1,
	1,
	6,
	3,
	2,
	9,
	100,
	-2,
	2,
	3,
	1,
	3,
	41,
	61,
	69,
	0,
	9,
	11,
	29,
	34,
	52,
	57,
	66,
	68,
	78,
	2,

	"Archie",
	"\0",
	"Moore",
	8,
	'e',
	1,
	9,
	10,
	6,
	8,
	5,
	0,
	4,
	5,
	2,
	2,
	8,
	85,
	-4,
	3,
	2,
	3,
	2,
	43,
	60,
	69,
	0,
	7,
	12,
	24,
	31,
	42,
	50,
	57,
	62,
	73,
	1,

	"Armando",
	"\0",
	"Muniz",
	7,
	'e',
	5,
	8,
	9,
	7,
	6,
	3,
	1,
	2,
	5,
	4,
	2,
	9,
	85,
	5,
	3,
	2,
	2,
	2,
	37,
	61,
	69,
	1,
	3,
	7,
	15,
	27,
	35,
	47,
	55,
	67,
	72,
	1,

	"Randy",
	"\0",
	"Neuman",
	4,
	'b',
	1,
	9,
	8,
	6,
	3,
	4,
	3,
	4,
	5,
	6,
	3,
	7,
	80,
	4,
	1,
	2,
	2,
	2,
	39,
	63,
	70,
	1,
	5,
	22,
	27,
	44,
	48,
	66,
	67,
	73,
	74,
	2,

	"Ken",
	"\0",
	"Norton",
	7,
	'e',
	1,
	9,
	8,
	8,
	6,
	3,
	3,
	3,
	6,
	4,
	3,
	8,
	90,
	0,
	2,
	3,
	1,
	2,
	41,
	62,
	70,
	1,
	9,
	24,
	29,
	41,
	46,
	54,
	59,
	67,
	72,
	2,

	"Lou",
	"\0",
	"Nova",
	7,
	'e',
	1,
	9,
	10,
	8,
	6,
	4,
	3,
	4,
	6,
	5,
	2,
	9,
	85,
	2,
	3,
	3,
	1,
	1,
	39,
	61,
	69,
	0,
	5,
	13,
	22,
	34,
	42,
	54,
	59,
	67,
	72,
	2,

	"Ossie",
	"\0",
	"Ocasio",
	6,
	's',
	1,
	9,
	9,
	7,
	6,
	3,
	2,
	2,
	5,
	2,
	2,
	9,
	85,
	4,
	3,
	1,
	1,
	1,
	37,
	63,
	70,
	1,
	3,
	7,
	15,
	27,
	35,
	47,
	55,
	67,
	72,
	2,

	"Bobo",
	"\0",
	"Olson",
	4,
	'e',
	3,
	8,
	8,
	7,
	5,
	6,
	3,
	4,
	4,
	5,
	3,
	7,
	85,
	2,
	2,
	2,
	2,
	2,
	38,
	63,
	70,
	1,
	2,
	8,
	12,
	29,
	33,
	50,
	53,
	66,
	69,
	2,

	"Sean",
	"\0",
	"O'Grady",
	7,
	's',
	10,
	9,
	9,
	8,
	7,
	4,
	2,
	3,
	5,
	5,
	3,
	9,
	80,
	0,
	1,
	2,
	2,
	3,
	38,
	63,
	70,
	1,
	7,
	12,
	27,
	37,
	52,
	62,
	69,
	74,
	78,
	3,

	"Jose",
	"\0",
	"Palacios",
	4,
	's',
	5,
	7,
	8,
	8,
	6,
	6,
	1,
	4,
	5,
	5,
	3,
	8,
	80,
	6,
	3,
	1,
	1,
	3,
	37,
	64,
	71,
	1,
	0,
	8,
	8,
	32,
	32,
	48,
	48,
	64,
	64,
	3,

	"Carlos",
	"\0",
	"Palomino",
	9,
	'e',
	5,
	10,
	10,
	8,
	7,
	2,
	2,
	1,
	6,
	4,
	2,
	8,
	90,
	0,
	3,
	2,
	1,
	2,
	43,
	62,
	69,
	1,
	11,
	18,
	29,
	36,
	44,
	49,
	60,
	67,
	74,
	2,

	"Billy",
	"\0",
	"Papke",
	10,
	's',
	3,
	11,
	11,
	8,
	8,
	3,
	1,
	2,
	6,
	4,
	2,
	9,
	90,
	0,
	2,
	2,
	2,
	3,
	41,
	61,
	69,
	2,
	2,
	6,
	14,
	26,
	37,
	53,
	56,
	60,
	68,
	2,

	"Bob",
	"\0",
	"Pastor",
	7,
	'b',
	1,
	9,
	10,
	6,
	3,
	2,
	1,
	2,
	6,
	3,
	2,
	7,
	90,
	-2,
	1,
	3,
	3,
	1,
	43,
	59,
	68,
	0,
	5,
	22,
	25,
	37,
	40,
	52,
	56,
	73,
	74,
	2,

	"Floyd",
	"\0",
	"Patterson",
	7,
	'e',
	1,
	10,
	8,
	7,
	6,
	5,
	3,
	3,
	6,
	2,
	5,
	9,
	95,
	-2,
	2,
	2,
	2,
	2,
	43,
	61,
	69,
	0,
	5,
	13,
	21,
	33,
	41,
	53,
	61,
	73,
	76,
	2,

	"Jean",
	"Baptiste",
	"Piedvache",
	4,
	'b',
	6,
	8,
	8,
	6,
	3,
	4,
	2,
	3,
	4,
	5,
	3,
	7,
	75,
	0,
	1,
	2,
	3,
	1,
	38,
	63,
	70,
	0,
	0,
	24,
	24,
	40,
	40,
	56,
	56,
	72,
	72,
	3,

	"Jerry",
	"\0",
	"Quarry",
	7,
	'e',
	1,
	9,
	10,
	8,
	7,
	3,
	2,
	3,
	5,
	7,
	3,
	9,
	85,
	4,
	2,
	2,
	2,
	2,
	39,
	62,
	70,
	1,
	5,
	13,
	22,
	34,
	42,
	54,
	59,
	67,
	72,
	2,

	"Armando",
	"\0",
	"Ramos",
	6,
	'e',
	7,
	9,
	10,
	8,
	7,
	6,
	3,
	5,
	5,
	4,
	2,
	9,
	80,
	4,
	2,
	1,
	2,
	3,
	38,
	62,
	70,
	1,
	5,
	13,
	18,
	26,
	38,
	54,
	59,
	67,
	72,
	2,

	"Sugar",
	"Ray",
	"Robinson",
	12,
	'b',
	3,
	11,
	12,
	8,
	7,
	2,
	1,
	1,
	6,
	3,
	2,
	9,
	90,
	-4,
	2,
	3,
	2,
	2,
	45,
	58,
	68,
	1,
	14,
	17,
	31,
	34,
	48,
	51,
	69,
	75,
	79,
	1,

	"Sugar",
	"Ray",
	"Robinson",
	12,
	'e',
	5,
	11,
	11,
	8,
	7,
	2,
	1,
	1,
	6,
	2,
	2,
	8,
	90,
	-4,
	2,
	3,
	2,
	2,
	46,
	59,
	67,
	0,
	18,
	23,
	37,
	40,
	49,
	51,
	69,
	74,
	79,
	0,

	"Vincente",
	"\0",
	"Rondon",
	5,
	'e',
	2,
	9,
	8,
	7,
	5,
	5,
	2,
	4,
	5,
	4,
	3,
	6,
	80,
	0,
	2,
	2,
	2,
	2,
	38,
	64,
	70,
	0,
	4,
	21,
	24,
	35,
	38,
	50,
	53,
	65,
	68,
	2,

	"Maxie",
	"\0",
	"Rosenbloom",
	7,
	'b',
	2,
	11,
	11,
	5,
	3,
	3,
	2,
	2,
	5,
	3,
	3,
	7,
	85,
	-5,
	3,
	3,
	2,
	0,
	41,
	60,
	69,
	1,
	5,
	22,
	27,
	44,
	45,
	51,
	55,
	73,
	74,
	1,

	"Lauro",
	"\0",
	"Salas",
	4,
	'b',
	7,
	9,
	8,
	6,
	4,
	6,
	3,
	5,
	5,
	6,
	4,
	7,
	75,
	0,
	2,
	3,
	3,
	0,
	39,
	62,
	69,
	1,
	5,
	22,
	26,
	43,
	46,
	58,
	61,
	73,
	74,
	2,

	"Max",
	"\0",
	"Schmeling",
	10,
	'e',
	1,
	10,
	10,
	8,
	8,
	2,
	2,
	2,
	5,
	2,
	3,
	8,
	100,
	-4,
	2,
	3,
	2,
	2,
	45,
	59,
	68,
	0,
	7,
	12,
	19,
	24,
	40,
	50,
	61,
	68,
	75,
	2,

	"Jack",
	"\0",
	"Sharkey",
	9,
	'e',
	1,
	10,
	10,
	8,
	6,
	3,
	1,
	2,
	6,
	3,
	2,
	8,
	90,
	0,
	3,
	2,
	2,
	2,
	43,
	60,
	69,
	0,
	12,
	19,
	26,
	31,
	42,
	50,
	57,
	62,
	73,
	2,

	"Earnie",
	"\0",
	"Shavers",
	8,
	's',
	1,
	8,
	10,
	10,
	8,
	3,
	1,
	3,
	6,
	3,
	2,
	9,
	80,
	6,
	3,
	1,
	2,
	3,
	39,
	62,
	70,
	1,
	14,
	17,
	31,
	34,
	48,
	51,
	55,
	56,
	74,
	2,

	"Battling",
	"\0",
	"Siki",
	9,
	's',
	2,
	10,
	9,
	8,
	9,
	3,
	1,
	2,
	6,
	3,
	2,
	10,
	85,
	0,
	2,
	2,
	2,
	2,
	41,
	61,
	69,
	1,
	4,
	6,
	17,
	25,
	36,
	44,
	55,
	62,
	73,
	2,

	"Al",
	"\0",
	"Singer",
	7,
	'e',
	7,
	9,
	9,
	8,
	7,
	3,
	3,
	4,
	5,
	5,
	3,
	8,
	85,
	0,
	2,
	2,
	2,
	2,
	39,
	61,
	69,
	0,
	5,
	13,
	18,
	26,
	38,
	54,
	59,
	67,
	68,
	2,

	"Jimmy",
	"\0",
	"Slattery",
	7,
	'b',
	2,
	9,
	10,
	6,
	3,
	3,
	3,
	2,
	5,
	4,
	4,
	7,
	85,
	-5,
	1,
	4,
	3,
	0,
	43,
	59,
	67,
	1,
	6,
	29,
	32,
	44,
	47,
	59,
	62,
	74,
	75,
	1,

	"Howard",
	"\0",
	"Smith",
	4,
	's',
	1,
	8,
	8,
	8,
	6,
	5,
	3,
	4,
	4,
	6,
	3,
	8,
	75,
	6,
	1,
	1,
	2,
	3,
	37,
	63,
	71,
	1,
	1,
	7,
	12,
	29,
	33,
	50,
	53,
	65,
	68,
	4,

	"Jeff",
	"\0",
	"Smith",
	9,
	'e',
	3,
	10,
	10,
	8,
	7,
	2,
	1,
	1,
	5,
	3,
	2,
	8,
	95,
	-2,
	3,
	2,
	2,
	2,
	41,
	60,
	69,
	1,
	8,
	20,
	23,
	27,
	35,
	47,
	52,
	60,
	68,
	1,

	"Ryu",
	"\0",
	"Sorimachi",
	4,
	'e',
	5,
	9,
	7,
	7,
	6,
	6,
	3,
	4,
	5,
	6,
	3,
	8,
	85,
	4,
	2,
	1,
	3,
	1,
	37,
	62,
	69,
	1,
	4,
	21,
	25,
	37,
	38,
	44,
	50,
	73,
	74,
	3,

	"Leon",
	"\0",
	"Spinks",
	7,
	'e',
	1,
	9,
	9,
	8,
	6,
	2,
	2,
	2,
	5,
	4,
	2,
	9,
	90,
	4,
	2,
	2,
	2,
	2,
	37,
	61,
	69,
	0,
	3,
	15,
	19,
	36,
	39,
	51,
	55,
	72,
	74,
	1,

	"Michael",
	"\0",
	"Spinks",
	7,
	'e',
	2,
	8,
	9,
	8,
	7,
	3,
	1,
	2,
	5,
	4,
	3,
	8,
	85,
	4,
	2,
	2,
	2,
	2,
	39,
	61,
	69,
	1,
	8,
	20,
	25,
	33,
	41,
	53,
	61,
	73,
	76,
	2,

	"Young",
	"\0",
	"Stribling",
	8,
	'e',
	1,
	10,
	10,
	6,
	4,
	2,
	1,
	1,
	6,
	4,
	2,
	7,
	90,
	-5,
	2,
	2,
	3,
	2,
	45,
	60,
	68,
	2,
	3,
	15,
	18,
	29,
	32,
	44,
	48,
	65,
	68,
	1,

	"John",
	"L.",
	"Sullivan",
	7,
	's',
	1,
	7,
	10,
	9,
	10,
	5,
	1,
	4,
	6,
	4,
	2,
	10,
	100,
	6,
	2,
	2,
	1,
	4,
	39,
	62,
	71,
	2,
	2,
	6,
	14,
	26,
	37,
	53,
	56,
	60,
	68,
	3,

	"John",
	"\0",
	"Tate",
	6,
	's',
	1,
	8,
	9,
	8,
	5,
	4,
	2,
	3,
	5,
	4,
	2,
	8,
	80,
	4,
	3,
	1,
	2,
	2,
	39,
	62,
	71,
	1,
	4,
	8,
	24,
	40,
	50,
	56,
	61,
	64,
	74,
	3,

	"Lew",
	"\0",
	"Tendler",
	9,
	'b',
	7,
	10,
	10,
	8,
	7,
	2,
	1,
	1,
	5,
	3,
	2,
	8,
	90,
	-2,
	2,
	3,
	2,
	1,
	41,
	61,
	69,
	2,
	9,
	21,
	26,
	34,
	42,
	54,
	59,
	67,
	68,
	2,

	"Ernie",
	"\0",
	"Terrell",
	8,
	'e',
	1,
	10,
	9,
	8,
	6,
	2,
	3,
	3,
	5,
	3,
	3,
	7,
	85,
	-2,
	2,
	2,
	2,
	2,
	41,
	60,
	69,
	1,
	9,
	21,
	29,
	41,
	46,
	54,
	59,
	67,
	72,
	2,

	"Hector",
	"\0",
	"Thompson",
	2,
	's',
	6,
	8,
	7,
	6,
	4,
	6,
	4,
	6,
	5,
	7,
	4,
	7,
	80,
	4,
	1,
	2,
	3,
	1,
	37,
	63,
	70,
	1,
	5,
	22,
	27,
	44,
	45,
	51,
	55,
	73,
	74,
	2,

	"Dick",
	"\0",
	"Tiger",
	10,
	'e',
	3,
	10,
	11,
	9,
	8,
	3,
	1,
	2,
	6,
	3,
	2,
	9,
	95,
	2,
	3,
	3,
	1,
	2,
	43,
	62,
	70,
	0,
	4,
	6,
	17,
	25,
	36,
	44,
	55,
	62,
	73,
	2,

	"Gene",
	"\0",
	"Tunney",
	11,
	'b',
	1,
	11,
	11,
	6,
	7,
	1,
	0,
	1,
	6,
	4,
	2,
	8,
	95,
	-6,
	2,
	3,
	2,
	2,
	45,
	59,
	68,
	1,
	15,
	25,
	32,
	37,
	44,
	49,
	64,
	74,
	78,
	1,

	"Gene",
	"\0",
	"Tunney",
	11,
	'b',
	2,
	11,
	11,
	7,
	5,
	1,
	1,
	1,
	6,
	4,
	2,
	8,
	90,
	-6,
	2,
	2,
	2,
	2,
	43,
	60,
	68,
	0,
	18,
	24,
	33,
	35,
	49,
	52,
	66,
	69,
	78,
	1,

	"Mel",
	"\0",
	"Turnbow",
	1,
	's',
	1,
	7,
	7,
	7,
	6,
	7,
	4,
	7,
	4,
	7,
	5,
	7,
	60,
	6,
	2,
	0,
	2,
	2,
	34,
	65,
	72,
	1,
	0,
	16,
	16,
	32,
	32,
	56,
	56,
	72,
	72,
	4,

	"Joe",
	"\0",
	"Walcott",
	11,
	'e',
	5,
	11,
	11,
	9,
	8,
	3,
	1,
	2,
	6,
	3,
	2,
	9,
	95,
	0,
	3,
	2,
	3,
	1,
	41,
	61,
	70,
	2,
	7,
	12,
	24,
	31,
	42,
	50,
	57,
	62,
	73,
	1,

	"Mickey",
	"\0",
	"Walker",
	11,
	'e',
	3,
	11,
	11,
	9,
	9,
	3,
	0,
	2,
	6,
	3,
	2,
	10,
	95,
	0,
	3,
	2,
	2,
	2,
	41,
	61,
	69,
	1,
	14,
	17,
	26,
	30,
	43,
	46,
	60,
	64,
	78,
	2,

	"Jim",
	"\0",
	"Watt",
	8,
	'e',
	7,
	9,
	9,
	8,
	7,
	3,
	1,
	2,
	6,
	5,
	2,
	9,
	85,
	0,
	2,
	2,
	2,
	2,
	39,
	61,
	69,
	1,
	5,
	13,
	21,
	33,
	41,
	53,
	61,
	73,
	76,
	2,

	"Freddie",
	"\0",
	"Welsh",
	8,
	'b',
	7,
	10,
	10,
	6,
	4,
	3,
	1,
	1,
	5,
	4,
	2,
	7,
	90,
	-4,
	2,
	3,
	3,
	0,
	41,
	60,
	68,
	0,
	7,
	30,
	34,
	51,
	52,
	58,
	61,
	73,
	74,
	1,

	"Jimmy",
	"\0",
	"Young",
	7,
	'b',
	1,
	9,
	9,
	6,
	5,
	3,
	1,
	2,
	5,
	4,
	2,
	6,
	80,
	-2,
	1,
	3,
	3,
	1,
	39,
	60,
	68,
	1,
	6,
	29,
	32,
	44,
	47,
	59,
	62,
	74,
	75,
	2,

	"Tony",
	"\0",
	"Zale",
	10,
	's',
	3,
	10,
	10,
	8,
	8,
	3,
	1,
	2,
	6,
	3,
	1,
	9,
	100,
	-2,
	3,
	2,
	2,
	2,
	43,
	61,
	69,
	0,
	7,
	12,
	24,
	31,
	42,
	50,
	57,
	62,
	73,
	2,

	"Fritzie",
	"\0",
	"Zivic",
	10,
	'e',
	5,
	10,
	10,
	8,
	8,
	3,
	1,
	2,
	7,
	3,
	2,
	9,
	90,
	-2,
	2,
	2,
	2,
	2,
	41,
	61,
	69,
	2,
	11,
	18,
	29,
	36,
	47,
	54,
	65,
	72,
	76,
	1,

	"Rocky",	/* boxer's first name */
	"\0",		/* boxer's middle name */
	"Balboa",	/* boxer's last name */
	11,		/* overall rating */
	'e',		/* style */
	1,		/* weight class */
	10,		/* control factor against a boxer */
	11,		/* control factor against a slugger */
	10,		/* hit power */
	6,		/* killer instinct */
	2,		/* knockdown rating 1 */
	1,		/* knockdown rating 2 */
	1,		/* knockout rating */
	5,		/* cut opponent rating */
	4,		/* cut himself rating */
	1,		/* technical knockout rating */
	9,		/* aggressiveness rating */
	100,		/* 10-round endurance */
	0,		/* defense rating */
	4,		/* fighting inside strategy available */
	2,		/* fighting outside strategy available */
	0,		/* cover-up strategy available */
	3,		/* knockout strategy available */
	42,		/* punches landed upper limit */
	60,		/* punches missed upper limit */
	69,		/* clinching upper limit */
	1,		/* foul rating */
	12,		/* 3-point jab upper limit */
	15,		/* 2-point jab upper limit */
	30,		/* 3-point hook upper limit */
	35,		/* 2-point hook upper limit */
	51,		/* 3-point cross upper limit */
	56,		/* 2-point cross upper limit */
	60,		/* 3-point combination upper limit */
	63,		/* 2-point combination upper limit */
	78,		/* 3-point uppercut upper limit */
	1,		/* in corner/on ropes adjustment factor */

	"Apollo",	/* boxer's first name */
	"\0",		/* boxer's middle name */
	"Creed",	/* boxer's last name */
	9,		/* overall rating */
	'b',		/* style */
	1,		/* weight class */
	10,		/* control factor against a boxer */
	9,		/* control factor against a slugger */
	7,		/* hit power */
	6,		/* killer instinct */
	3,		/* knockdown rating 1 */
	2,		/* knockdown rating 2 */
	2,		/* knockout rating */
	6,		/* cut opponent rating */
	1,		/* cut himself rating */
	2,		/* technical knockout rating */
	8,		/* aggressiveness rating */
	95,		/* 10-round endurance */
	-4,		/* defense rating */
	1,		/* fighting inside strategy available */
	3,		/* fighting outside strategy available */
	2,		/* cover-up strategy available */
	0,		/* knockout strategy available */
	45,		/* punches landed upper limit */
	60,		/* punches missed upper limit */
	68,		/* clinching upper limit */
	0,		/* foul rating */
	16,		/* 3-point jab upper limit */
	28,		/* 2-point jab upper limit */
	31,		/* 3-point hook upper limit */
	37,		/* 2-point hook upper limit */
	46,		/* 3-point cross upper limit */
	53,		/* 2-point cross upper limit */
	64,		/* 3-point combination upper limit */
	69,		/* 2-point combination upper limit */
	72,		/* 3-point uppercut upper limit */
	0,		/* in corner/on ropes adjustment factor */

	"Mr.",		/* boxer's first name */
	"\0",		/* boxer's middle name */
	"T",		/* boxer's last name */
	10,		/* overall rating */
	's',		/* style */
	1,		/* weight class */
	9,		/* control factor against a boxer */
	11,		/* control factor against a slugger */
	10,		/* hit power */
	10,		/* killer instinct */
	3,		/* knockdown rating 1 */
	0,		/* knockdown rating 2 */
	1,		/* knockout rating */
	5,		/* cut opponent rating */
	1,		/* cut himself rating */
	1,		/* technical knockout rating */
	10,		/* aggressiveness rating */
	110,		/* 10-round endurance */
	2,		/* defense rating */
	3,		/* fighting inside strategy available */
	0,		/* fighting outside strategy available */
	2,		/* cover-up strategy available */
	3,		/* knockout strategy available */
	42,		/* punches landed upper limit */
	60,		/* punches missed upper limit */
	71,		/* clinching upper limit */
	2,		/* foul rating */
	5,		/* 3-point jab upper limit */
	8,		/* 2-point jab upper limit */
	33,		/* 3-point hook upper limit */
	39,		/* 2-point hook upper limit */
	48,		/* 3-point cross upper limit */
	52,		/* 2-point cross upper limit */
	55,		/* 3-point combination upper limit */
	62,		/* 2-point combination upper limit */
	74,		/* 3-point uppercut upper limit */
	1,		/* in corner/on ropes adjustment factor */

	"null",
	"\0",
	"null",
	0,
	'n',
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0
};
//E*O*F names.c//

echo x - stat
cat > "stat" << '//E*O*F stat//'
#
# Usage: stat fighter
#awk  "/$1/ {count=35} count > 0 {print;count=count-1}" names.c|more
//E*O*F stat//

echo x - subs1.c
cat > "subs1.c" << '//E*O*F subs1.c//'

/**********************************************************
 *							  *
 *                  TKO -- The Boxing Game		  *
 *							  *
 **********************************************************/


/*
Copyright (c) 1979  Mike Gancarz
Permission is hereby granted to freely distribute, copy, modify and otherwise
use this software for nonprofit purposes as long as this copyright appears
in the file and remains intact.
*/


#include "def.h"
#include "extern.h"


savegm()
{
	write(1, "\033[;H\033[2J", 8); /* DEC VT100 only */
	speed = 0;
	freopen("tko.sav","w",stdout);
}


ckname(str)	/* check for boxers' names in name file */
char str[LINE];
{
	register int i;
	int r;
	char fname[NAMSIZ];
	char lname[NAMSIZ];

	sscanf(str,"%s",fname);
	*fname=toupper(*fname);
	for(;;)		/* strip off any white space at end of name */
	{
		if(iswhite(str[strlen(str)-1]))
			str[strlen(str)-1]='\0';
		else break;
	}
	sscanf(rindex(str,' '),"%s",lname);
	*lname=toupper(*lname);
	r = -1;
	for(i=0; i < nboxers; i++)
	{
if (((strcmp(fname,bx[i].fname) == 0) && ((strcmp(lname,bx[i].lname) == 0) || strcmp(lname,bx[i].mname) == 0)) && (bx[i].weight == w))
		{
			r=i;
			break;
		}
	}
	return(r);
}


getrtst()	/* get run-time statistics */
{

	rt[0].bxptr = a;	/* get bx[] structure offsets */
	rt[1].bxptr = b;

	switch(bx[b].style)	/* determine boxer a's control factor */
	{
		case 'b':
			rt[0].ccf = bx[a].cfb;
			break;
		case 's':
			rt[0].ccf = bx[a].cfs;
			break;
		case 'e':
			if(bx[a].cfb == bx[a].cfs)
				rt[0].ccf = bx[a].cfb;
			if(bx[a].cfb > bx[a].cfs)
				rt[0].ccf = bx[a].cfs;
			if(bx[a].cfb < bx[a].cfs)
				rt[0].ccf = bx[a].cfb;
			break;
	}

	switch(bx[a].style)	/* determine boxer b's control factor */
	{
		case 'b':
			rt[1].ccf = bx[b].cfb;
			break;
		case 's':
			rt[1].ccf = bx[b].cfs;
			break;
		case 'e':
			if(bx[b].cfb == bx[b].cfs)
				rt[1].ccf = bx[b].cfb;
			if(bx[b].cfb > bx[b].cfs)
				rt[1].ccf = bx[b].cfs;
			if(bx[b].cfb < bx[b].cfs)
				rt[1].ccf = bx[b].cfb;
			break;
	}

				/* adjust maximum control factor to 10 */
	while((rt[0].ccf > 10) || (rt[1].ccf > 10))
	{
		--rt[0].ccf;
		--rt[1].ccf;
	}

				/* adjust minimum control factor to 10 */
	while((rt[0].ccf < 10) && (rt[1].ccf < 10))
	{
		++rt[0].ccf;
		++rt[1].ccf;
	}

	rt[0].chp = bx[a].hp;	/* get current hit power */
	rt[1].chp = bx[b].hp;

	rt[0].ckdr1 = bx[a].kdr1;	/* get current knockdown rating 1 */
	rt[1].ckdr1 = bx[b].kdr1;

	if(rt[0].chp == 10)	/* adjust kdr1 according to opponent's hp */
		rt[1].ckdr1 = rt[1].ckdr1 + 2;
	else if(rt[0].chp == 9)
		++rt[1].ckdr1;
	else if(rt[0].chp == 6)
		--rt[1].ckdr1;
	else if(rt[0].chp == 5)
		rt[1].ckdr1 = rt[1].ckdr1 - 2;

	if(rt[1].chp == 10)
		rt[0].ckdr1 = rt[0].ckdr1 + 2;
	else if(rt[1].chp == 9)
		++rt[0].ckdr1;
	else if(rt[1].chp == 6)
		--rt[0].ckdr1;
	else if(rt[1].chp == 5)
		rt[0].ckdr1 = rt[0].ckdr1 - 2;

	if(rt[0].ckdr1 <= 0)
		rt[0].ckdr1 = 1;
	if(rt[1].ckdr1 <= 0)
		rt[1].ckdr1 = 1;
	if(rt[0].ckdr1 > 10)
		rt[0].ckdr1 = 10;
	if(rt[1].ckdr1 > 10)
		rt[1].ckdr1 = 10;

	rt[0].cagg = bx[a].agg;		/* get current aggressiveness rating */
	rt[1].cagg = bx[b].agg;
hmr:
	printf("How many rounds? ");	/* find out how many rounds */
	gets(temp);
	sscanf(temp,"%d",&nrounds);
	if((nrounds < 3) || (nrounds > 15))
	{
		printf("?TKO: 3 to 15 rounds only\n");
		goto hmr;
	}

			/* get endurance and adjust it for number of rounds */
	rt[0].cend = (bx[a].end * nrounds)/10;
	rt[1].cend = (bx[b].end * nrounds)/10;

			/* get punches landed and adjust according to defense */
	rt[0].cdef = bx[a].def;
	rt[1].cdef = bx[b].def;
	rt[0].cpl = bx[a].pl + rt[1].cdef;
	rt[1].cpl = bx[b].pl + rt[0].cdef;

			/* set punch values at normal; these may change if a
			   boxer injures himself */
	rt[0].cpv3 = rt[1].cpv3 = 3;
	rt[0].cpv2 = rt[1].cpv2 = 2;
}


int getagg()	/* determine the aggressor of the fight */
{
	if(rt[0].cagg > rt[1].cagg)
		return(0);
	if(rt[1].cagg > rt[0].cagg)
		return(1);
	if(bx[a].rating > bx[b].rating)
		return(0);
	if(bx[b].rating > bx[a].rating)
		return(1);
	if(rnd80 > rnd80)
		return(0);
	else return(1);
}


ptable()	/* print "tale of the tables" message */
{
	printf("\n\n\t\t\tTALE OF THE TABLES\n\n");
	printf("\t\t    %-12s%s\n",bx[a].lname,bx[b].lname);
	printf("%-20s%-12d%-6dhigh numbers mean better control\n","Control factor:",rt[0].ccf,rt[1].ccf);
	printf("%-20s%-12d%-6dthe higher the number, the harder he hits\n","Hit power:",rt[0].chp,rt[1].chp);
	printf("%-20s%-12d%-6dhigh number: he cleans up if you look hurt","Killer instinct:",bx[a].ki,bx[b].ki);
	printf("%-20s%-12d%-6dlower number: means he has a tougher chin\n","Knockdown rating:",rt[0].ckdr1+bx[a].kdr2,rt[1].ckdr1+bx[b].kdr2);
	printf("%-20s%-12d%-6dhigh number: he has staying power\n","Endurance:",rt[0].cend,rt[1].cend);
	printf("%-20s%-12d%-6dlow number: difficult to knock him out\n","Knockout rating:",bx[a].kor,bx[b].kor);
	printf("%-20s%-12.0f%-6.0f\n","Punch accuracy(%):",(float)100*rt[0].cpl/bx[a].pm,(float)100*rt[1].cpl/bx[b].pm);
	printf("%-20s%-12d%-6dhigh number: he bleeds easily\n","Cut susceptibility:",bx[a].ch+bx[b].co,bx[b].ch+bx[a].co);
	printf("%-20s%-12d%-6dlow number: he can take a lot of punches\n","Tko susceptibility:",bx[a].tko,bx[b].tko);
	printf("\n\t%s will be the aggressor.\n",bx[rt[fagg].bxptr].lname);
}


pround()	/* print the round number */
{
	register int cc,size1,size2;

	sprintf(temp,"*  %s vs. %s  *\n",bx[a].lname,bx[b].lname);
	size1 = strlen(temp);
	if(round < 10)
		size2 = 7;
	 else	size2 = 8;

	for(cc=1; cc < size1; cc++)
		putchar('*');
	putchar('\n');
	putchar('*');
	for(cc=2; cc < size1-1; cc++)
		putchar(' ');
	printf("*\n%s*",temp);
	for(cc=1; cc < (size1 - size2)/2; cc++)
		putchar(' ');
	printf("ROUND %d",round);
	for(cc=((size1-size2)/2)+size2; cc < size1 - 2; cc++)
		putchar(' ');
	putchar('*');
	putchar('\n');
	putchar('*');
	for(cc=2; cc < size1-1; cc++)
		putchar(' ');
	putchar('*');
	putchar('\n');
	for(cc=1; cc < size1; cc++)
		putchar('*');
	putchar('\n');
}



getcard()	/* get an unused boxing action card */
{
	register int i,tmp;

	--actcnt;
	if(killer > 0)	/* if killer instinct in effect, reduce killer count */
		--killer;

	if(cused[79] != 0)	/* if all cards used, return a random card */
		return(rnd80);

	for(;;)
	{
		tmp = rnd80;
		for(i=0; i < 80; i++)
		{
			if(cused[i] == tmp)
				break;
			if(cused[i] == 0)
			{
				cused[i] = tmp;
				return(tmp);
			}
		}
	}
}



score()		/* compute the winner of the round */
{
	register byte hiscore;

	if(rt[0].cnpts == rt[1].cnpts)	/* even round */
	{
		if((rt[0].ckdflg > 0) && (rt[1].ckdflg > 0))
			return;
		else if(rt[0].ckdflg > 0)
		{
			++rt[1].cj1scr;
			++rt[1].cj2scr;
			++rt[1].crscr;
		}
		else if(rt[1].ckdflg > 0)
		{
			++rt[0].cj1scr;
			++rt[0].cj2scr;
			++rt[0].crscr;
		}
		return;
	}

	if(rt[0].cnpts > rt[1].cnpts)
		hiscore=0;
	else hiscore=1;

	if((rt[hiscore].cnpts - rt[flip(hiscore)].cnpts) >= 6)
	{
		++rt[hiscore].cj1scr;
		++rt[hiscore].cj2scr;
		++rt[hiscore].crscr;
	}
	else {
		ccard=getcard();

		switch(CARD.acj1)
		{
		case 'H':
			++rt[hiscore].cj1scr;
			break;
		case 'L':
			++rt[flip(hiscore)].cj1scr;
		case 'E':
			break;
		}

		switch(CARD.acj2)
		{
		case 'H':
			++rt[hiscore].cj2scr;
			break;
		case 'L':
			++rt[flip(hiscore)].cj2scr;
		case 'E':
			break;
		}

		switch(CARD.acref)
		{
		case 'H':
			++rt[hiscore].crscr;
			break;
		case 'L':
			++rt[flip(hiscore)].crscr;
			break;
		case 'E':
			break;
		}
	}
	return;
}
//E*O*F subs1.c//

echo x - subs2.c
cat > "subs2.c" << '//E*O*F subs2.c//'

/**********************************************************
 *							  *
 *                  TKO -- The Boxing Game		  *
 *							  *
 **********************************************************/

/*
Copyright (c) 1979  Mike Gancarz
Permission is hereby granted to freely distribute, copy, modify and otherwise
use this software for nonprofit purposes as long as this copyright appears
in the file and remains intact.
*/


#include "def.h"
#include "extern.h"


punch()		/* a punch was landed */
{
	register int c;
	int kdres,strong;

	kdres=NOKD;
	ccard = lcard = getcard();
#ifdef DEBUG
printf("3 card count = %d\tcard = %d\n",actcnt,ccard);
#endif
	if(CARD.accutk == 100)	/* check for a chance of a knockdown */
		kdres=kdcheck();

	if(kdres == NOKD)
	{
		strong=gpunch();	/* get the punch */

		c = rand() % 8;
		switch(c)
		{
		case 0:
			printf("%s connects with a ",OFFNAME);
			break;
		case 1:
			printf("%s lands a ",OFFNAME);
			break;
		case 2:
			printf("%s catches %s with a ",OFFNAME,DEFNAME);
			break;
		case 3:
			printf("%s tags %s with a ",OFFNAME,DEFNAME);
			break;
		case 4:
			printf("%s pops %s with a ",OFFNAME,DEFNAME);
			break;
		case 5:
			printf("%s is on target with a ",OFFNAME);
			break;
		case 6:
			printf("%s delivers a ",OFFNAME);
			break;
		case 7:
			printf("%s stings him with a ",OFFNAME);
		}

		if(strong == YES)
		{
					/* score points for punch landed */
			RTOFF.cnpts=RTOFF.cnpts+RTOFF.cpv3;

					/* describe the punch verbally */
			c = rand() % 5;
			switch(c)
			{
			case 0:
				fputs("tough",stdout);
				break;
			case 1:
				fputs("solid",stdout);
				break;
			case 2:
				fputs("firm",stdout);
				break;
			case 3:
				fputs("powerful",stdout);
				break;
			case 4:
				fputs("heavy",stdout);
			}
		} else {
					/* score points for punch landed */
			RTOFF.cnpts=RTOFF.cnpts+RTOFF.cpv2;

			c = rand() % 5;
			switch(c)
			{
			case 0:
				fputs("light",stdout);
				break;
			case 1:
				fputs("soft",stdout);
				break;
			case 2:
				fputs("short",stdout);
				break;
			case 3:
				fputs("weak",stdout);
				break;
			case 4:
				fputs("glancing",stdout);
			}
		}
		puts(ptype);
		if(BXOFF.co >= LCARD.accutk)	/* check for chance of a cut */
			cutcheck();
	}
}



miss()
{
	register int c;

	--RTOFF.cend;	/* deduct an endurance point for a miss */
	c = rand() % 6;

	switch(c)
	{
	case 0:
		printf("%s swings and misses\n",OFFNAME);
		break;
	case 1:
       printf("%s ducks as %s tries to fire one to his head\n",DEFNAME,OFFNAME);
		break;
	case 2:
		printf("%s avoids a stiff body punch\n",DEFNAME);
		break;
	case 3:
		printf("%s's swing is off target\n",OFFNAME);
		break;
	case 4:
		printf("%s tries to dig one in, but %s steps back out of reach\n",OFFNAME,DEFNAME);
		break;
	case 5:
		printf("%s\'s punch misses the mark as %s moves from side to side\n",OFFNAME,DEFNAME);
	}
}



clinch()
{
	register int c;
	c = rand() % 4;

	switch(c)
	{
	case 0:
		printf("%s is clinching\n",OFFNAME);
		break;
	case 1:
		printf("%s ties him up\n",OFFNAME);
		break;
	case 2:
		printf("%s ties up %s in the clinch\n",OFFNAME,DEFNAME);
		break;
	case 3:
		printf("%s holds on\n",OFFNAME);
	}

	sleep(speed);
	c = rand() % 6;

	switch(c)
	{
	case 0:
		printf("The referee separates them\n");
		break;
	case 1:
		printf("%s pushes away\n",DEFNAME);
		break;
	case 2:
	       printf("%s tries to force %s into the corner\n",OFFNAME,DEFNAME);
		break;
	case 3:
		printf("The referee steps in to separate them\n");
		break;
	case 4:
		printf("The referee has to pull them apart\n");
		break;
	case 5:
		break;
	}
}



movement()
{
	register int c;

	c = rnd80 % 4;
	switch(c)
	{
	case 0:
		printf("%s is moving around the ring\n",OFFNAME);
		break;
	case 1:
		printf("%s steps back away from %s\n",OFFNAME,DEFNAME);
		break;
	case 2:
		printf("%s moves to his left\n",OFFNAME);
		break;
	case 3:
		printf("%s moves to his right\n",OFFNAME);
	}
}



foul()		/* chance of a foul */
{
	printf("There is a chance of a foul\n");
}


injury()	/* chance that a fighter has been injured */
{
	ccard = getcard();
	if(ccard > 73)
	{
		switch(ccard)
		{
			case 74:
    printf("%s pops %s in the nose with a solid right cross\n",DEFNAME,OFFNAME);
				RTDEF.cnpts = RTDEF.cnpts+2;
				sleep(speed);
		printf("%s seems to be having trouble breathing\n",OFFNAME);
				if(RTDEF.ccf <= 9)
					RTDEF.ccf = RTDEF.ccf+2;
				else if(RTOFF.ccf > 2)
					RTOFF.ccf = RTOFF.ccf-2;
				sleep(speed);
			printf("It looks like %s's nose is broken!\n",OFFNAME);
				break;
			case 75:
	    printf("%s plants a crunching hook on %s's jaw\n",DEFNAME,OFFNAME);
				RTDEF.cnpts = RTDEF.cnpts+3;
				sleep(speed);
				printf("%s is grimacing in pain\n",OFFNAME);
				if(RTDEF.ccf <= 9)
					RTDEF.ccf = RTDEF.ccf+2;
				else if(RTOFF.ccf > 2)
					RTOFF.ccf = RTOFF.ccf-2;
				sleep(speed);
			    printf("%s is trying desperately to cover up\n",
					OFFNAME);
				sleep(speed);
				printf("%s broke his jaw!\n",DEFNAME);
				break;
			case 76:
				break;
			case 77:
				break;
			case 78:
				break;
			case 79:
				break;
		}
	}
}



gpunch()	/* get the actual punch */
{
		if(LCARD.achand == 'L') /* determine which hand */
			strcpy(ptype," left ");
		else strcpy(ptype," right ");

		if(LCARD.acpunch <= BXOFF.jab2)
		{
			strcat(ptype,"jab");
			if(LCARD.acpunch <= BXOFF.jab3)
				return(HARD);
			else return(SOFT);
		}

		if(LCARD.acpunch <= BXOFF.hook2)
		{
			strcat(ptype,"hook");
			if(LCARD.acpunch <= BXOFF.hook3)
				return(HARD);
			else return(SOFT);
		}

		if(LCARD.acpunch <= BXOFF.cross2)
		{
			strcat(ptype,"cross");
			if(LCARD.acpunch <= BXOFF.cross3)
				return(HARD);
			else return(SOFT);
		}

		if(LCARD.acpunch <= BXOFF.combo2)
		{
			strcat(ptype,"combination");
			if(LCARD.acpunch <= BXOFF.combo3)
				return(HARD);
			else return(SOFT);
		}

		strcat(ptype,"uppercut");
		if(LCARD.acpunch <= BXOFF.upper3)
				return(HARD);
			else return(SOFT);
}



kdcheck()	/* check for a knockdown */
{
	register int c,i,tmp;

	ccard=getcard();
#ifdef DEBUG
printf("4 card count = %d\tcard = %d\n",actcnt,ccard);
#endif
	if(CARD.ackd <= RTOFF.chp)	/* enought hit power? */
	{
		tmp = gpunch();	/* get the type of punch */

		c = rand() % 6;
		switch(c)
		{
		case 0:
			printf("%s unloads on %s with a ",OFFNAME,DEFNAME);
			break;
		case 1:
			printf("%s blasts %s with a ",OFFNAME,DEFNAME);
			break;
		case 2:
			printf("%s drives home a ",OFFNAME);
			break;
		case 3:
			printf("%s lets loose a ",OFFNAME);
			break;
		case 4:
			printf("%s smashes %s with a ",OFFNAME,DEFNAME);
			break;
		case 5:
			printf("%s pounds %s with a ",OFFNAME,DEFNAME);
		}

		c = rand() % 5;
		switch(c)
		{
		case 0:
			printf("tremendous%s!\n",ptype);
			break;
		case 1:
			printf("fantastic%s!\n",ptype);
			break;
		case 2:
			printf("devastating%s!\n",ptype);
			break;
		case 3:
			printf("crusher of a%s!\n",ptype);
			break;
		case 4:
			printf("pulverizing%s!\n",ptype);
		}

#ifdef DEBUG
printf("There is a chance of a knockdown\n");
#endif
		sleep(speed/2);
		ccard=getcard();
#ifdef DEBUG
printf("5 card count = %d\tcard = %d\n",actcnt,ccard);
#endif
		if(RTDEF.ckdflg > 0)
		    tmp = kdtab[(20*(BXDEF.kdr2+RTDEF.ckdr1-1))+(CARD.ackdr-1)];
		else tmp = kdtab[(20*(RTDEF.ckdr1-1))+(CARD.ackdr-1)];
#ifdef DEBUG
printf("Score a %d for tmp\n",tmp);
#endif
		switch(tmp)
		{
			case 0:
				RTOFF.cnpts=RTOFF.cnpts+4;
			       printf("%s looks a little wobbly\n",DEFNAME);
				return(NOKILL);
			case 1:
				RTOFF.cnpts=RTOFF.cnpts+5;
		printf("%s falls back against the ropes\n",DEFNAME);
				if(killer <= 0)
					killer = BXOFF.ki;
				return(killer);
			case 2:
				printf("%s hits the deck!\n",DEFNAME);
				sleep(speed/2);
				if(killer <= 0)
					killer = BXOFF.ki;
				kocheck();
				++RTDEF.ckdflg; /* set the knockdown flag */

				ccard = getcard(); /* determine the kd count */
				if(ccard <= 5)
					kdcount=1;
				else kdcount=((byte)ccard/10)+1;

				if(kdcount <= 3)	/* score the points */
					RTOFF.cnpts=RTOFF.cnpts+6;
				else if(kdcount <= 6)
					RTOFF.cnpts=RTOFF.cnpts+7;
				else RTOFF.cnpts=RTOFF.cnpts+kdcount+1;


				printf("The referee starts counting...\n");
				for(i=1; i <= kdcount; i++)
				{
					printf("\t%d\n",i);
					if(speed != 0)
						sleep(2);
					if(kdcount > 5) stumble();
				}
				printf("He's up at %d\n",kdcount);
				if(speed != 0)
					sleep(1);
				if(kdcount < 8)
	       printf("The referee gives him the mandatory standing 8 count\n");
				sleep(speed);
				return(killer);
		}
	}
	return(NOKD);
}



kocheck()	/* check for a knockout */
{
	int i;

	ccard = getcard();
	if(kdtab[(20*(RTDEF.ckdr1-1))+(CARD.ackdr-1)] == 2)
	{
		printf("The referee starts counting...\n");
		for(i=1; i < 11; i++)
		{
			printf("\t%d\n",i);
			if (speed != 0)
				sleep(2);
			stumble();
		}
	printf("%s cannot get up...%s has knocked him out!!\n",DEFNAME,OFFNAME);
		sleep(speed);
		if(round == 1)
	printf("%s wins by k.o. in the 1st round\n",OFFNAME);
		else if(round == 2)
	printf("%s wins by k.o. in the 2nd round\n",OFFNAME);
		else if(round == 3)
	printf("%s wins by k.o. in the 3rd round\n",OFFNAME);
	       else printf("%s wins by k.o. in the %dth round\n",OFFNAME,round);

		exit(0);
	}
}



stumble()	/* show a fighter stumbling when knocked down */
{
	int c;

	c = rand() % 30;
	if(c < 5)
	{
	switch(c)
	{
		case 0:
		 printf("%s tries to pull himself up with the ropes\n",DEFNAME);
			break;
		case 1:
    printf("The referee motions to %s to stay in the neutral corner\n",OFFNAME);
			break;
		case 2:
			printf("%s is struggling to get up\n",DEFNAME);
			break;
		case 3:
			printf("%s is up\n",DEFNAME);
			printf("He's back down\n");
			break;
		case 4:
			break;
	}
	}
}


cutcheck()	/* check for a cut */
{
	register byte c,tmp,z;

	ccard = getcard();
	sleep(speed);

	tmp = (BXDEF.ch-1)*9;
	z=0;
	for(c=0; c < 9; c++)
	{
		if(ccard <= cuttab[tmp++])
		{
			z=c;
			break;
		}
	}
	if(c == 9)
		z=c;

	switch(z)
	{
	case 0:
		break;
	case 1:
		printf("%s's nose is bleeding\n",DEFNAME);
		break;
	case 2:
      printf("There appears to be a slight cut under %s's right eye\n",DEFNAME);
		break;
	case 3:
      printf("There appears to be a slight cut under %s's left eye\n",DEFNAME);
		break;
	case 4:
     printf("%s has opened a slight cut over %s's right eye\n",OFFNAME,DEFNAME);
		break;
	case 5:
       printf("There is a small trickle of blood over %s's left eye\n",DEFNAME);
		break;
	case 6:
		printf("%s is cut on the bridge of his nose\n",DEFNAME);
		break;
	case 7:
		printf("%s's mouth is badly torn\n",DEFNAME);
		break;
	case 8:
  printf("%s has opened a terrible gash over %s's right eye\n",OFFNAME,DEFNAME);
		sleep(speed);
		printf("The referee asks the ring doctor take a look at it\n");
		sleep(speed);
   printf("The doctor says the eye is all right and allows them to continue\n");
		break;
	case 9:
  		printf("%s has a very bad gash over his left eye\n",DEFNAME);
		sleep(speed);
		printf("The referee asks the ring doctor take a look at it\n");
		sleep(speed);
   printf("The doctor says that %s can continue, although it doesn't look good\n",DEFNAME);
	}

	if((z > 0) && (z < 7))	/* score the cut point */
		++RTDEF.cncpts;
	else if(z >= 7)
	{
		RTDEF.cncpts=RTDEF.cncpts+2;
		if(RTOFF.ccf <= 9)   /* reduce control factor on nasty cuts */
			++RTOFF.ccf;
		else if(RTDEF.ccf > 1)
			--RTDEF.ccf;
	}
}



tkocut()	/* check for tko because of cuts */
{
	register int i;
	byte tko[2];

	for(i=0; i < 2; i++)
	{
		tko[i] = NO;
		if(rt[i].cncpts > rt[i].pncpts)
		{
			rt[i].pncpts=rt[i].cncpts;
     printf("%s's cornermen work to stop the bleeding\n",bx[rt[i].bxptr].lname);
			sleep(speed);
			if(rt[i].cncpts > 6)
			{
				ccard = getcard();
				switch(rt[i].cncpts)
				{
				case 7:
					if(ccard < 21)
						tko[i] = YES;
					else {
	      printf("The referee asks the ring doctor to examine %s\n",CUTNAM);
					sleep(speed);
			     printf("The doctor says %s can continue\n",CUTNAM);
					sleep(speed);
					}
					break;
				case 8:
					if(ccard < 41)
						tko[i] = YES;
					else {
				printf("%s's cornermen look worried\n",CUTNAM);
					sleep(speed);
				printf("Their man can't go on like this much longer\n");
					sleep(speed);
					}
					break;
				case 9:
					if(ccard < 61)
						tko[i] = YES;
					else {
			    printf("%s's cornermen summon the doctor\n",CUTNAM);
					sleep(speed);
			 printf("The doctor takes a close look at %s\n",CUTNAM);
					sleep(speed);
			printf("He says that %s looks pretty bad\n",CUTNAM);
					sleep(speed);
			printf("If %s gets any worse, he'll have to stop the fight\n",CUTNAM);
					sleep(speed);
					}
					break;
				case 10:
				default:
					tko[i] = YES;
				}
			}
		}
	}

	if((tko[0] == YES) && (tko[1] == YES))
	{
printf("Both fighters are cut so badly that neither can answer the bell for round %d\n",round+1);
		sleep(speed);
		printf("The officials declare the bout a draw\n");
		exit(0);
	}
	else if((tko[0] || tko[1]) == YES)
	{
		for(i=0; i < 2; i++)
		{
			if(tko[i] == YES)
			{
		printf("The referee asks the ring doctor to take a look at %s again\n",bx[rt[i].bxptr].lname);
		sleep(speed);
		printf("The doctor looks at %s and shakes his head\n",bx[rt[i].bxptr].lname);
		sleep(speed);
		printf("He advises the referee to stop the fight\n");
		sleep(speed);
		printf("%s scores a technical knockout over %s in %d rounds\n",bx[rt[flip(i)].bxptr].lname,bx[rt[i].bxptr].lname,round);
			exit(0);
			}
		}
	}
}



autotko()	/* check for an automatic tko */
{
	register int i;
	byte tko[2];
	register byte c;

	for(i=0; i < 2; i++)
	{
		tko[i] = NO;
		if(atko[BXI.tko-1] <= rt[i].cnpts)
			tko[i] = YES;
		else if(atko[BXI.tko+4] <= rt[i].cnpts + rt[i].catko1)
			tko[i] = YES;
	       else if(atko[BXI.tko+9] <= rt[i].cnpts+rt[i].catko1+rt[i].catko2)
			tko[i] = YES;
	}

	if((tko[0] == YES) && (tko[1] == YES))
	{
		sleep(speed);
printf("Neither fighter can answer the bell for round %d\n",round+1);
		sleep(speed);
		printf("The officials declare the bout a draw\n");
		exit(0);
	}
	else if((tko[0] || tko[1]) == YES)
	{
		sleep(speed);
		for(i=0; i < 2; i++)
		{
			if(tko[i] != YES)
			{
				c = rand() % 3;
				switch(c)
				{
				case 0:
		printf("%s's corner throws in the towel\n",BXI.lname);
					break;
				case 1:
		printf("The referee takes a good look at %s\n",BXI.lname);
					sleep(speed);
				       printf("He decides to stop the fight\n");
					break;
				case 2:
		printf("%s has sustained so much punishment that he cannot\n",BXI.lname);
			printf("answer the bell for round %d\n",round+1);
					break;
				}
		sleep(speed);
		printf("%s scores a technical knockout over %s in %d rounds\n",bx[rt[flip(i)].bxptr].lname,bx[rt[i].bxptr].lname,round);
			exit(0);
			}
		}
	}
	else for(i=0; i < 2; i++)
	{
		rt[i].catko2=rt[i].catko1;
		rt[i].catko1=rt[i].cnpts;
	}
}
//E*O*F subs2.c//

echo x - tables.c
cat > "tables.c" << '//E*O*F tables.c//'

/**********************************************************
 *							  *
 *                  TKO -- The Boxing Game		  *
 *							  *
 **********************************************************/


/*
Copyright (c) 1979  Mike Gancarz
Permission is hereby granted to freely distribute, copy, modify and otherwise
use this software for nonprofit purposes as long as this copyright appears
in the file and remains intact.
*/


#include "def.h"

/** boxing action card **/
struct action{
	byte	acrp;		/* ring position */
	char	acrpchk;	/* check ring position */
	byte	accf;		/* control factor */
	char	achand;		/* left- or right-hand punch */
	byte	accutk;		/* check for cuts or knockdowns: 100=kd */
	byte	acpunch;	/* punch number */
	byte	ackd;		/* knockdown attempt */
	byte	ackdr;		/* knockdown rating */
	byte	ackor;		/* knockout rating */
	char	acj1;		/* judge 1 scoring */
	char	acj2;		/* judge 2 scoring */
	char	acref;		/* referee scoring */
} act[81] = {
	0,'\0',0,'\0',0,0,0,0,0,'\0','\0','\0',		/* null card */
	6,'n',12,'R',100,79,10,4,8,'H','L','H',		/* card 1 */
	0,'n',17,'R',100,72,3,3,10,'E','H','H',		/* card 2 */
	0,'n',5,'L',50,49,11,10,15,'H','E','H',		/* card 3 */
	0,'n',2,'R',50,21,19,18,6,'H','E','E',		/* card 4 */
	0,'n',7,'R',50,7,7,1,12,'L','E','E',		/* card 5 */
	0,'n',9,'R',50,17,8,14,9,'L','L','H',		/* card 6 */
	0,'n',3,'L',100,32,2,20,17,'L','H','L',		/* card 7 */
	1,'y',4,'R',50,25,1,9,13,'H','H','H',		/* card 8 */
	0,'n',10,'R',50,41,9,2,7,'H','L','H',		/* card 9 */
	2,'n',14,'L',3,11,17,19,20,'H','H','E',		/* card 10 */
	0,'n',6,'L',50,55,12,7,1,'H','L','H',		/* card 11 */
	8,'n',13,'R',5,62,7,7,4,'H','H','H',		/* card 12 */
	0,'n',20,'L',100,70,5,11,3,'L','H','H',		/* card 13 */
	2,'y',15,'R',50,23,6,16,5,'H','H','L',		/* card 14 */
	0,'n',8,'R',50,43,4,12,11,'H','E','H',		/* card 15 */
	0,'n',3,'L',50,10,15,14,7,'L','H','L',		/* card 16 */
	8,'n',11,'L',50,35,14,5,5,'H','E','H',		/* card 17 */
	7,'n',11,'L',50,12,12,1,20,'H','H','H',		/* card 18 */
	0,'n',10,'R',50,36,10,13,8,'E','L','L',		/* card 19 */
	0,'n',16,'L',50,15,2,8,16,'L','L','H',		/* card 20 */
	0,'n',19,'R',50,71,3,6,12,'H','H','L',		/* card 21 */
	0,'n',18,'L',100,37,4,2,2,'H','E','L',		/* card 22 */
	0,'n',1,'R',50,6,13,15,14,'L','E','H',		/* card 23 */
	5,'n',9,'L',10,47,16,17,18,'L','H','L',		/* card 24 */
	7,'n',7,'L',50,65,18,9,10,'E','H','E',		/* card 25 */
	0,'n',3,'R',100,77,1,10,3,'L','H','E',		/* card 26 */
	0,'n',16,'R',50,27,8,5,14,'E','E','L',		/* card 27 */
	6,'y',12,'L',50,67,20,8,12,'H','H','H',		/* card 28 */
	0,'n',20,'L',100,24,4,11,4,'H','H','H',		/* card 29 */
	0,'n',1,'R',50,3,9,13,19,'H','L','H',		/* card 30 */
	5,'n',18,'R',7,78,3,12,11,'H','E','E',		/* card 31 */
	0,'n',2,'R',50,30,11,17,16,'E','H','L',		/* card 32 */
	0,'n',33,'R',50,46,5,4,1,'H','H','H',		/* card 33 */
	5,'n',20,'L',100,61,20,19,1,'E','H','L',	/* card 34 */
	7,'n',4,'R',50,2,6,14,10,'H','H','H',		/* card 35 */
	0,'y',10,'R',50,5,2,11,2,'E','L','E',		/* card 36 */
	0,'n',6,'L',50,38,13,15,15,'H','L','E',		/* card 37 */
	1,'n',5,'R',100,66,1,3,6,'L','H','H',		/* card 38 */
	0,'n',17,'L',100,54,14,16,13,'H','L','H',	/* card 39 */
	0,'n',8,'R',50,40,16,18,9,'L','H','H',		/* card 40 */
	0,'n',5,'R',50,28,12,6,12,'H','L','L',		/* card 41 */
	0,'n',20,'R',50,64,1,1,10,'E','L','H',		/* card 42 */
	0,'y',13,'L',50,73,6,17,3,'H','E','L',		/* card 43 */
	7,'n',14,'R',50,53,19,10,4,'E','H','E',		/* card 44 */
	0,'n',15,'L',50,33,18,5,3,'H','E','L',		/* card 45 */
	6,'n',5,'R',1,19,7,14,17,'H','H','H',		/* card 46 */
	0,'n',10,'L',50,66,2,12,9,'L','H','H',		/* card 47 */
	0,'n',11,'L',50,50,9,1,11,'H','H','L',		/* card 48 */
	0,'n',9,'L',9,26,13,13,7,'H','L','E',		/* card 49 */
	0,'n',6,'L',4,13,17,16,11,'H','H','E',		/* card 50 */
	6,'n',1,'R',100,45,3,3,6,'E','L','H',		/* card 51 */
	8,'n',7,'R',50,34,8,20,8,'L','H','H',		/* card 52 */
	8,'n',2,'R',50,18,15,19,18,'H','H','H',		/* card 53 */
	0,'n',13,'L',50,48,10,7,5,'E','E','H',		/* card 54 */
	0,'n',4,'L',2,60,20,18,19,'L','H','H',		/* card 55 */
	0,'n',12,'L',50,42,11,20,19,'L','L','H',	/* card 56 */
	0,'n',19,'R',100,27,19,18,13,'H','L','H',	/* card 57 */
	0,'n',18,'L',100,75,11,9,1,'L','H','H',		/* card 58 */
	0,'n',8,'L',100,51,16,15,7,'L','H','E',		/* card 59 */
	2,'n',1,'L',100,59,13,16,9,'H','E','L',		/* card 60 */
	0,'n',6,'L',50,39,10,8,5,'L','E','H',		/* card 61 */
	1,'n',16,'L',100,68,5,12,8,'L','H','H',		/* card 62 */
	0,'y',9,'R',50,44,9,17,15,'E','L','H',		/* card 63 */
	0,'n',8,'R',50,9,14,4,2,'L','L','L',		/* card 64 */
	0,'n',14,'L',6,80,18,20,4,'E','E','L',		/* card 65 */
	0,'n',2,'L',8,14,15,10,17,'H','L','L',		/* card 66 */
	0,'y',18,'L',50,1,4,2,14,'H','H','L',		/* card 67 */
	0,'n',3,'L',50,20,6,15,16,'E','H','L',		/* card 68 */
	2,'n',15,'R',100,29,8,2,15,'E','H','H',		/* card 69 */
	1,'n',17,'L',50,16,5,13,9,'L','H','H',		/* card 70 */
	0,'n',13,'L',50,22,17,9,20,'E','H','E',		/* card 71 */
	0,'n',12,'R',50,8,7,6,14,'H','L','L',		/* card 72 */
	5,'y',4,'L',50,58,16,19,13,'H','H','L',		/* card 73 */
	0,'n',19,'R',100,63,12,3,6,'L','E','H',		/* card 74 */
	0,'n',17,'R',50,76,14,11,16,'H','L','L',	/* card 75 */
	0,'n',7,'L',100,57,17,4,18,'H','L','E',		/* card 76 */
	0,'n',11,'R',50,69,20,8,20,'L','L','E',		/* card 77 */
	0,'n',16,'L',50,31,18,5,19,'L','H','L',		/* card 78 */
	0,'n',15,'R',50,4,19,7,17,'H','L','H',		/* card 79 */
	0,'n',14,'R',50,74,15,6,18,'H','H','E'		/* card 80 */
};


/** ring positions **/
/*int rp[] = {	0,		/* ring center */
/*		1,		/* near ropes */
/*		2,		/* far ropes */
/*		3,		/* left ropes */
/*		4,		/* right ropes */
/*		5,		/* boxer a's corner */
/*		6,		/* boxer b's corner */
/*		7,		/* left neutral corner */
/*		8		/* right neutral corner */
/*};*/

/** weight classes **/
char *wc[12] = {
		"null",
	/* 1 */	"Heavyweight",
	/* 2 */	"Light heavyweight",
	/* 3 */	"Middleweight",
	/* 4 */	"Jr. Middleweight",
	/* 5 */	"Welterweight",
	/* 6 */	"Jr. Welterweight",
	/* 7 */	"Lightweight",
	/* 8 */	"Jr. Lightweight",
	/* 9 */	"Bantamweight",
	/* 10*/	"Featherweight",
	/* 11*/	"Flyweight"
};

/** run-time statistics **/
struct rtstat{
	int	bxptr;		/* pointer to boxer data structure */
	byte	ccf;		/* current control factor */
	byte	chp;		/* current hit power */
	byte	ckdr1;		/* current knockdown rating 1 */
	byte	cagg;		/* current aggressiveness rating */
	int	cend;		/* amount of endurance left */
	byte	cdef;		/* current defense rating */
	byte	cpl;		/* current punches landed upper limit */
	byte	cnpm;		/* current number of punches missed */
	byte	cnpts;		/* current number of points */
	byte	catko1;		/* auto-tko score from previous round */
	byte	catko2;		/* auto-tko score from previous round */
	byte	pncpts;		/* previous number of cut points */
	byte	cncpts;		/* current number of cut points */
	byte	cj1scr;		/* current judge #1 score */
	byte	cj2scr;		/* current judge #2 score */
	byte	crscr;		/* current referee score */
	byte	ckdflg;		/* current knockdown flag */
} rt[2] = {
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};

/** knockdown/knockout table **/
byte kdtab[200] = {
	0,0,0,0,0,2,0,0,0,1,0,0,0,0,1,0,0,0,0,0,
	0,2,0,0,0,1,0,0,2,0,1,0,0,2,0,0,0,1,0,0,
	1,0,0,2,1,0,2,0,1,0,0,0,2,0,1,0,0,2,0,0,
	0,1,2,0,1,2,1,0,0,2,2,0,1,1,0,0,2,0,0,2,
	2,0,0,2,0,1,2,0,1,2,1,0,0,2,2,1,1,0,1,2,
	1,2,2,0,2,0,0,2,2,1,2,2,1,0,0,2,2,1,1,1,
	2,1,1,2,1,2,1,0,2,1,0,1,2,2,2,0,0,2,2,2,
	1,1,2,2,0,2,2,2,1,2,2,2,0,1,2,2,2,0,2,1,
	2,2,2,1,2,0,2,2,1,1,1,2,2,0,1,2,2,2,2,2,
	1,2,1,1,2,2,2,2,2,2,2,2,0,2,2,2,1,2,1,2
};

/** primary cut table **/
byte cuttab[90] = {
	/*  a  b  c  d  e  f  g  h */
	68,72,76,76,76,76,77,78,79,
	60,60,64,68,68,68,72,76,78,
	52,56,60,64,64,64,68,72,76,
	44,48,52,56,60,64,68,72,76,
	40,44,48,52,56,60,64,72,76,
	40,44,48,52,52,52,60,68,76,
	32,40,44,48,48,48,52,64,72,
	24,32,40,44,48,52,56,60,72,
	24,32,40,44,44,44,48,56,68,
	24,32,40,44,44,44,48,52,68
};

/** automatic tko table **/
byte atko[15] = {
	/* 1  2  3  4  5 -- tko rating */
	  35,30,27,25,23, /* 1 round total */
	  50,45,42,40,38, /* 2 round total */
	  60,55,52,50,48  /* 3 round total */
};

/** miscellaneous variables **/
int nboxers;	/* number of boxers in the names file */
int nrounds;	/* number of rounds in the fight */
int round;	/* current round number */
int a;		/* boxer a  bx[] offset */
int b;		/* boxer b bx[] offset */
int fagg;	/* fight aggressor */
int offense;	/* fighter on offense */
int actcnt;	/* boxing action card counter */
int ccard;	/* current boxing action card */
int lcard;	/* last boxing action card */
byte killer;	/* killer instinct flag */
byte kdcount;	/* knockdown count */
byte deck;	/* which half of the boxing action card deck is being used */
byte w;		/* weight class for this fight */
int speed;	/* speed at which the fight will take place */
char temp[LINE];/* temporary string buffer */
int cused[80];	/* boxing action cards already used this round */
char ptype[20];	/* verbal description of type of punch landed */
//E*O*F tables.c//

echo x - tko.c
cat > "tko.c" << '//E*O*F tko.c//'
/**********************************************************
 *							  *
 *                  TKO -- The Boxing Game		  *
 *							  *
 **********************************************************/


/*
Copyright (c) 1979  Mike Gancarz
Permission is hereby granted to freely distribute, copy, modify and otherwise
use this software for nonprofit purposes as long as this copyright appears
in the file and remains intact.
*/


#include "def.h"
#include "extern.h"


main()
{
	int i,z;

	printf("TKO\tVersion 1.1\n\n");

	srand(getpid());
	for(nboxers=0;;)	/* count the number of available boxers */
		if(bx[++nboxers].rating == 0) break;

	for(w=1; w < 12; w++)
		printf("%d= %s\n",w,wc[w]);
loopw:
	for(;;)		/* query the operator for weight class */
	{
		printf("Enter the weight class number: ");
		gets(temp);
		sscanf(temp,"%d",&w);
		if((w < 1) || (w > 11))
		{
			printf("?TKO: no such weight class number\n");
			goto loopw;
		}
		else break;
	}

	printf("Do you wish to see a list of the boxers' names? ");
	gets(temp);
	if((toupper(temp[0])) == 'Y')
	{
		printf("\nTKO's star %ss are:\n",wc[w]);
		z=0;
		for(i=0; i < nboxers; i++)
		{
			if(bx[i].weight == w)
			{
		       	if(bx[i].mname[0] == '\0')
 	      			printf("%s %s\n",bx[i].fname,bx[i].lname);
			else
		       printf("%s %s %s\n",bx[i].fname,bx[i].mname,bx[i].lname);
			z++;
			}
			if(z > 20)
			{
				printf("\tPress <return> to see more ");
				gets(temp);
				z=0;
			}
		}
	}

	for(;;)		/* verify that this boxer is in the name file */
	{
		printf("Please print the boxer's full name: ");
		gets(temp);
		if((a=ckname(temp)) != -1)
			break;
		else printf("?TKO: invalid boxer name\n");
	}

loop1:
	for(;;)		/* verify that his opponent is in the name file */
	{
		printf("Please print his opponent's full name: ");
		gets(temp);
		if((b=ckname(temp)) != -1)
			break;
		else printf("?TKO: invalid boxer name\n");
	}

	if(bx[a].weight != bx[b].weight) /* are boxers in same weight class? */
	{
printf("?TKO: You can't match a %s with a %s!\n",wc[bx[b].weight],wc[bx[a].weight]);
		printf("Try another opponent.\n");
		goto loop1;
	}

	getrtst();	/* get run-time boxer statistics */

loop2:
	for(;;)		/* query the operator for the speed of the fight */
	{
		printf("Specify fight speed [0 (fast) to 10 (slow)]: ");
		gets(temp);
		sscanf(temp,"%d",&speed);
		if(speed > 10)
		{
			printf("?TKO: valid speeds are from 0 to 10\n");
			goto loop2;
		}
		else break;
	}

	fagg = getagg();	/* get the aggressor of the fight */
	ptable();	/* print the "tale of the tables" message */
	rt[0].cncpts=rt[1].cncpts=rt[0].pncpts=rt[1].pncpts=0;

	printf("\nPress <return> to begin the fight.");
	gets(temp);
	signal(SIGINT,savegm);
	printf("\n\n");

	RTOFF.catko1=RTDEF.catko1=0; /* reset auto tko points counter */
	RTOFF.catko2=RTDEF.catko2=0; /* reset auto tko points counter */
	deck = 0;	/* reset the action card array */
	for(i=0; i < 80; i++)
		cused[i] = 0;

	/****************************************************
	 *	The following loop contains the code for the*
	 *	live action of the fight		    *
	 ****************************************************/

	for(round=1; round <= nrounds; round++)
	{
		pround();	/* print the round number */
		RTOFF.cnpts=RTDEF.cnpts=0; /* reset punch points counter */
		RTOFF.ckdflg=RTDEF.ckdflg=0; /* clear knockdown flag */
		kdcount=0;	/* clear knockdown counter */
		offense = fagg; /* aggressor starts action on offense */
		actcnt = 40;	/* reset boxing action card counter */
		killer = NOKILL;/* reset killer instinct flag */

	ccard = getcard();	/* see who's in control */
#ifdef DEBUG
printf("1 card count = %d\tcard = %d\n",actcnt,ccard);
#endif

	while(actcnt > 0)
	{
		if((killer <= 0) && (CARD.accf > RTOFF.ccf))
		{
			offense = flip(offense);
#ifdef DEBUG
		       printf("%s is in control\n",OFFNAME);
#endif
		}

		if(killer > 0)
			sleep(speed/2);
		else sleep(speed);
		ccard = getcard();	/* determine the action */
#ifdef DEBUG
printf("2 card count = %d\tcard = %d\n",actcnt,ccard);
#endif
		if(ccard <= RTOFF.cpl)
			punch();
		else if(ccard <= BXOFF.pm)
			miss();
		else if(ccard <= BXOFF.cl)
			clinch();
		else if(ccard < 79)
			movement();
		else if(ccard == 79)
			foul();
		else injury();

		if(killer <= 0)		/* if not in killer instinct, */
		{
			ccard = getcard();	/* see who's in control       */
#ifdef DEBUG
printf("1 card count = %d\tcard = %d\n",actcnt,ccard);
#endif
		}
	}

	if(deck == 0)	/* clear portions of used card array */
		i=40;
	else i=0;
	for(; i < 80; i++)
		cused[i] = 0;
#ifdef DEBUG
printf("deck used was %d\n",deck);
#endif
	deck = flip(deck);
	printf("End of round %d\n",round);
	sleep(speed);
	if(round < nrounds)
		tkocut();	/* check for a tko because of cuts */

		/* decrease hit power if boxer has used up his endurance */
	if(rt[0].cend <= 0)
	{
		--rt[0].cpl;	/* reduce punches landed, too */
		if(rt[0].chp > 1)
			--rt[0].chp;
	}
	if(rt[1].cend <= 0)
	{
		--rt[1].cpl;	/* reduce punches landed, too */
		if(rt[1].chp > 1)
			--rt[1].chp;
	}

printf("Points this round: %s(%d)\t%s(%d)\n",bx[rt[0].bxptr].lname,rt[0].cnpts,bx[rt[1].bxptr].lname,rt[1].cnpts);

			/* deduct endurance points for punches in this round */
	rt[0].cend=rt[0].cend-rt[1].cnpts;
	rt[1].cend=rt[1].cend-rt[0].cnpts;
printf("Endurance left: %s(%d)\t%s(%d)\n\n",BX0NAM,rt[0].cend,BX1NAM,rt[1].cend);

	score();	/* compute the winner of round */
	if(round < nrounds)
		autotko();	/* check for an automatic tko */

	sleep(speed*2);
	}

	printf("We are awaiting the scoring of the judges...\n");
	sleep(speed*2);
	printf("Judge #1 scores the fight:\t");
	printf("%d-%d-%d ",J1WSCR,J1LSCR,nrounds-(J1WSCR+J1LSCR));
	if(J1WSCR== J1LSCR)
		puts("even");
	else puts(bx[rt[J1WIN].bxptr].lname);
	sleep(speed);
	printf("Judge #2 scores the fight:\t");
	printf("%d-%d-%d ",J2WSCR,J2LSCR,nrounds-(J2WSCR+J2LSCR));
	if(J2WSCR== J2LSCR)
		puts("even");
	else puts(bx[rt[J2WIN].bxptr].lname);
	sleep(speed);
	printf("The referee scores the fight:\t");
	printf("%d-%d-%d ",REFWSCR,REFLSCR,nrounds-(REFWSCR+REFLSCR));
	if(REFWSCR== REFLSCR)
		puts("even");
	else puts(bx[rt[REFWIN].bxptr].lname);
}
//E*O*F tko.c//

exit 0