[comp.sources.games] v04i008: xgo - go for curses or X-windows, Part04/04

games@tekred.TEK.COM (04/09/88)

Submitted by: Greg Hale <sting.berkeley.edu!hale@ucbvax>
Comp.sources.games: Volume 4, Issue 8
Archive-name: xgo/Part04


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 4 (of 4)."
# Contents:  Xd.h Xu.h del.c dohand.c exit.c fill.c games/Proto
#   games/Proto.blk games/README games/enig.1k.1 games/enig.2k.1
#   games/g.10k.2 games/g.11k.1 games/g.12k.1 games/g.15k.1
#   games/g.15k.2 games/g.9k.1 games/save.10k games/save.10k.1 go.c
#   handicap.c initboard.c kill.c killit.c movecur.c moveto.c nomove.c
#   plt.c setboard.c status.c tally.c util.c xexit.c xgo.c xinit.c
#   xkeyp.c xpiecenum.h xplt.c xprintboard.c xtraps.c xvar.c
# Wrapped by billr@saab on Fri Apr  8 14:27:19 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f Xd.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xd.h\"
else
echo shar: Extracting \"Xd.h\" \(1146 characters\)
sed "s/^X//" >Xd.h <<'END_OF_Xd.h'
X/*
X * $Header: Xd.h,v 1.2 88/02/13 12:56:07 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define d_width 25
X#define d_height 25
Xstatic short d_bits[] = {
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x3800, 0x0000,
X   0xffff, 0x01ff, 0x3800, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xd.h,v $
X * Revision 1.2  88/02/13  12:56:07  hale
X * added logging.
X * 
X */
X
END_OF_Xd.h
if test 1146 -ne `wc -c <Xd.h`; then
    echo shar: \"Xd.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xu.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xu.h\"
else
echo shar: Extracting \"Xu.h\" \(1146 characters\)
sed "s/^X//" >Xu.h <<'END_OF_Xu.h'
X/*
X * $Header: Xu.h,v 1.2 88/02/13 12:56:54 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define u_width 25
X#define u_height 25
Xstatic short u_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x3800, 0x0000,
X   0xffff, 0x01ff, 0x3800, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000};
X/*
X * $Log:	Xu.h,v $
X * Revision 1.2  88/02/13  12:56:54  hale
X * added logging.
X * 
X */
X
END_OF_Xu.h
if test 1146 -ne `wc -c <Xu.h`; then
    echo shar: \"Xu.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f del.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"del.c\"
else
echo shar: Extracting \"del.c\" \(730 characters\)
sed "s/^X//" >del.c <<'END_OF_del.c'
X/*
X * $Header: del.c,v 1.2 88/02/13 12:44:43 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
Xdeletes (x,y)
Xint x,y;
X{
X	InitBoard(&marks);
X	killit(x,y,b(x,y));
X}
X
X/*
X * $Log:	del.c,v $
X * Revision 1.2  88/02/13  12:44:43  hale
X * added logging.
X * 
X */
X
END_OF_del.c
if test 730 -ne `wc -c <del.c`; then
    echo shar: \"del.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f dohand.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"dohand.c\"
else
echo shar: Extracting \"dohand.c\" \(956 characters\)
sed "s/^X//" >dohand.c <<'END_OF_dohand.c'
X/*
X * $Header: dohand.c,v 1.4 88/02/19 13:47:54 hale Exp $
X */
X
X#include "go.h"
X
XDoHand(x,y,c)
Xint x,y,c;
X{
X	int p;
X
X	if (b(x,y)!= 0)
X		sethand(x,y,(b(x,y)==c+1 ? 0:c+1));
X	else
X		putpiece(x,y,c,false);
X
X	if (c) SetBlkCur();
X	else SetWhtCur();
X}
X
Xsethand(x,y,v)
Xint x,y,v;
X{
X	if (b(x,y) != v) {
X		b(x,y)= v;
X		Plt(&board,x,y);
X		SEND(MHANDICAP);
X		SendCoord(x,y);
X		sendint(v);
X	}
X}
X/*
X * $Log:	dohand.c,v $
X * Revision 1.4  88/02/19  13:47:54  hale
X * Added io changes for loading games.
X * Load game is cleaned up.  Variable board
X * sizes and formats available in save game
X * as well as printed comments.
X * 
X * Revision 1.3  88/02/14  00:21:16  hale
X * Added load file option during game to restore game to starting
X * state.  Also, clear board operation.  Restoring game puts current
X * player in sync.  With the demo mode, this is invaluable.
X * 
X * Revision 1.2  88/02/13  12:45:02  hale
X * modified and maximized the handicap given to 9.
X * 
X */
X
END_OF_dohand.c
if test 956 -ne `wc -c <dohand.c`; then
    echo shar: \"dohand.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f exit.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"exit.c\"
else
echo shar: Extracting \"exit.c\" \(731 characters\)
sed "s/^X//" >exit.c <<'END_OF_exit.c'
X/*
X * $Header: exit.c,v 1.2 88/02/13 12:47:56 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
XExit()
X{
X	unsetmode();
X	clear();
X	refresh();
X	endwin();
X	exit(0);
X}
X
X/*
X * $Log:	exit.c,v $
X * Revision 1.2  88/02/13  12:47:56  hale
X * added logging.
X * 
X */
X
END_OF_exit.c
if test 731 -ne `wc -c <exit.c`; then
    echo shar: \"exit.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f fill.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"fill.c\"
else
echo shar: Extracting \"fill.c\" \(951 characters\)
sed "s/^X//" >fill.c <<'END_OF_fill.c'
X/*
X * $Header: fill.c,v 1.2 88/02/13 12:48:37 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
Xstatic int fillwith;
X
Xfill(x,y,type)
Xint x,y,type;
X{
X	fillwith=type;
X	InitBoard(&marks);
X	fill0(x,y);
X}
X
Xfill0(x,y)
Xint x,y;
X{
X	if (ir(x,y) and b(x,y)==NONE and m(x,y)==NONE) {
X			m(x,y)=MARK;
X			b(x,y)=fillwith;
X			fill0(x-1,y);
X			fill0(x+1,y);
X			fill0(x,y-1);
X			fill0(x,y+1);
X		}
X}
X
X/*
X * $Log:	fill.c,v $
X * Revision 1.2  88/02/13  12:48:37  hale
X * added logging.
X * 
X */
X
END_OF_fill.c
if test 951 -ne `wc -c <fill.c`; then
    echo shar: \"fill.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/Proto -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/Proto\"
else
echo shar: Extracting \"games/Proto\" \(537 characters\)
sed "s/^X//" >games/Proto <<'END_OF_games/Proto'
X#!/usr/public/xgo -m -l
X; first, the #!stuff to run the prog.
X; must be first line
X; run by typing .../file opponent@host
X
X; followed by board size then whos turn
X19 0
X; a # delimits game data
X#
X; optional formats
X; b/B# bottom justify for # lines of data
X; r/R# right justify for # columns of data
X......w.bb.
X..bbw..wwb.
X..b.wwwbbb.
X..bww.b....
X..bw.wb....
X..bwwwb....
X..bbbbb....
X...........
X; # delimits end of board info
X#
X; captured (black white) cursor x,y
X0 0 0 0
X; comments printed to info window
X% black to play and kill white
END_OF_games/Proto
if test 537 -ne `wc -c <games/Proto`; then
    echo shar: \"games/Proto\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/Proto.blk -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/Proto.blk\"
else
echo shar: Extracting \"games/Proto.blk\" \(356 characters\)
sed "s/^X//" >games/Proto.blk <<'END_OF_games/Proto.blk'
X#!/usr/public/xgo -m -l
X; run by typing ".../file opponent@host"
X19 0
X#
X. . . . . . . . . . . . . . . . . . . 
X. . . . . . . . . . . . . . . . . . . 
X. . . . . . . . . . . . . . . . . . . 
X. . . . . . . . . . . . . . . . . . . 
X. . . . . . . . . . . . . . . . . . . 
X. . . . . . . . . . . . . . . . . . . 
X#
X0 0 0 0
X; comments printed to info window
X% By:
END_OF_games/Proto.blk
if test 356 -ne `wc -c <games/Proto.blk`; then
    echo shar: \"games/Proto.blk\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/README -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/README\"
else
echo shar: Extracting \"games/README\" \(424 characters\)
sed "s/^X//" >games/README <<'END_OF_games/README'
XTo make a new file, either run the program and save a screen and edit it,
Xor copy Proto.blk to a new name and edit it.  In either case, proto is
Xa prototypical save file you can look at.
X
XI suggest you use the following standard for saved games:
X
X	name.#a.#b
X
Xname may be anything (could describe the problem, class of problem, or theme)
X#a is the approximate rank of the problem
X#b is a way of associating related problems
END_OF_games/README
if test 424 -ne `wc -c <games/README`; then
    echo shar: \"games/README\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/enig.1k.1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/enig.1k.1\"
else
echo shar: Extracting \"games/enig.1k.1\" \(841 characters\)
sed "s/^X//" >games/enig.1k.1 <<'END_OF_games/enig.1k.1'
X#!/usr/public/xgo -m -l
X19 0
X#
X. . . . . @ . @ @ . . . . . @ @ @ @ @ 
X. . . . . . . @ . . . . . . . . O O @ 
X. @ . . . . O O . . . . . . . O . @ O 
X. . . . . . @ O . . . . . . . O @ @ O 
X. . . . . @ . O . . . . . . @ O O O . 
X. . . . . . @ O . . . . . . . @ @ O @ 
X. . . . . . @ O @ . . . . . . @ @ O @ 
X. . . . . @ . O . @ . . . . O @ . O @ 
X. . . . @ . O O O . . . . @ @ O O @ @ 
X. . . . . @ . . . . . . . . . . . . . 
X. . @ . @ . . . . . . . . . . . . . @ 
X@ . . O O O . . . . . . . O O O @ . . 
X. . O . . O @ . . . . . . @ @ O @ . . 
X@ . O . . O . . . . . . . @ O @ @ . . 
X. . @ O O @ . . . . . @ . O O O @ . . 
X@ . O . . O . . . . @ . . . . O @ . . 
X@ . O . . O . . . . . . . O O @ @ . . 
X. @ . O O . . . . . @ . @ . @ . . . . 
X@ . @ @ @ . @ . . . @ . @ . . . @ @ . 
X#
X1 1 0 0
X
X% white to play and make ladder
X% at 13,6. Does it work?
X
END_OF_games/enig.1k.1
if test 841 -ne `wc -c <games/enig.1k.1`; then
    echo shar: \"games/enig.1k.1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/enig.2k.1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/enig.2k.1\"
else
echo shar: Extracting \"games/enig.2k.1\" \(224 characters\)
sed "s/^X//" >games/enig.2k.1 <<'END_OF_games/enig.2k.1'
X#!/usr/public/xgo -m -l
X; run by typing .../file opponent@host
X15 0
X#
Xb8
X...........
X.........w.
X....wwww...
X...wwbbb.w.
X...wb...bw.
X.w.wb.bwbw.
X..bwbw.wbw.
X...b....bw.
X#
X0 0 0 0
X% white to play and kill black.
X% VERY HARD.
END_OF_games/enig.2k.1
if test 224 -ne `wc -c <games/enig.2k.1`; then
    echo shar: \"games/enig.2k.1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/g.10k.2 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/g.10k.2\"
else
echo shar: Extracting \"games/g.10k.2\" \(609 characters\)
sed "s/^X//" >games/g.10k.2 <<'END_OF_games/g.10k.2'
X#!/usr/public/xgo -m -l
X; first, the #!stuff to run the prog.
X; must be first line
X; run by typing .../file opponent@host
X
X; followed by board size then whos turn
X19 0
X; a # delimits game data
X#
X; optional formats
X; b/B# bottom justify for # lines of data
X; r/R# right justify for # columns of data
X. . . . . O . . . . . X . .
X. . . X O . . . O . O X . .
X. . X . X O O . . . O X . .
X. . . . X . X X X . O X . .
X. . . . . . . . . X X . . .
X. . . . . . . . . . . . . .
X; # delimits end of board info
X#
X; captured (black white) cursor x,y
X0 0 0 0
X; comments printed to info window
X% black to play and kill white
END_OF_games/g.10k.2
if test 609 -ne `wc -c <games/g.10k.2`; then
    echo shar: \"games/g.10k.2\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/g.11k.1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/g.11k.1\"
else
echo shar: Extracting \"games/g.11k.1\" \(303 characters\)
sed "s/^X//" >games/g.11k.1 <<'END_OF_games/g.11k.1'
X#!/usr/public/xgo -m -l
X; run by typing ".../file opponent@host"
X19 0
X#
X. . . . O . . . . . X . .
X. . X O . . . O . O X . .
X. X . X O O . . . O X . .
X. . . X . X X X . O X . .
X. . . . . . . . X X . . .
X. . . . . . . . . . . . .
X#
X0 0 0 0
X; comments printed to info window
X% black to play and kill white
END_OF_games/g.11k.1
if test 303 -ne `wc -c <games/g.11k.1`; then
    echo shar: \"games/g.11k.1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/g.12k.1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/g.12k.1\"
else
echo shar: Extracting \"games/g.12k.1\" \(206 characters\)
sed "s/^X//" >games/g.12k.1 <<'END_OF_games/g.12k.1'
X#!/usr/public/xgo -m -l
X; ../file oppon@host
X13 0
X#
X......w.bb.
X..bbw..wwb.
X..b.wwwbbb.
X..bww.b....
X..bw.wb....
X..bwwwb....
X..bbbbb....
X...........
X#
X0 0 0 0
X% black to play and kill white
X% #203 in GGP #2
END_OF_games/g.12k.1
if test 206 -ne `wc -c <games/g.12k.1`; then
    echo shar: \"games/g.12k.1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/g.15k.1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/g.15k.1\"
else
echo shar: Extracting \"games/g.15k.1\" \(896 characters\)
sed "s/^X//" >games/g.15k.1 <<'END_OF_games/g.15k.1'
X#!/usr/public/xgo -m -l
X; run by typing ".../file opponent@host"
X19 0
X#
X. . x x x x x o . . . . . x o o o x .
Xo x x o o o x o . . . . . x . . . x .
Xo x x x x o x o . . . . . . . o . . .
Xo o o x x o x o . . . . . . . . . . .
Xx o . . x o x o . . . . . . o o o . .
Xx o o x x o x o . . . . . . . o . . .
Xx o x x x o x o . . . . . . . . . . .
Xx o o o o o x o . . . . . . . . . . .
Xx x x x x x x o . . . . . . . . . . .
Xo o o o o o o o . . . . . . . . . . .
X. . . . . . . . . . . . . . . . . . .
X. . . . . . . . . . . . . . . . . . .
X. x x x . . . . . . . . . x . . . . .
X. o o x . . . . . . . . . . . . x . .
X. . o x . . . . . . . . . . . . . x .
X. . o x . . . . . . . . . x . o o x .
Xo o x x . . . . . . . . . x x o . o .
X. . o x . . . . . . . . . . . . o . .
Xo o . x . . . . . . . . . . x . . . .
X#
X0 0 0 0
X; comments printed to info window
X% Black to play
X% What is the result
X% in each situation?
END_OF_games/g.15k.1
if test 896 -ne `wc -c <games/g.15k.1`; then
    echo shar: \"games/g.15k.1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/g.15k.2 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/g.15k.2\"
else
echo shar: Extracting \"games/g.15k.2\" \(293 characters\)
sed "s/^X//" >games/g.15k.2 <<'END_OF_games/g.15k.2'
X#!/usr/public/xgo -m -l
X; run by typing ".../file opponent@host"
X13 0
X#
Xb7
X. . . . . . . . .
X. . . . . . . . .
Xo o o . . . . . .
Xx x o o . . . . .
X. . x o o . . . .
X. x . x o . . . .
X. . . x o . . . .
X#
X0 0 0 0
X; comments printed to info window
X% By: Greg Hale
X% white to play and kill black.
END_OF_games/g.15k.2
if test 293 -ne `wc -c <games/g.15k.2`; then
    echo shar: \"games/g.15k.2\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/g.9k.1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/g.9k.1\"
else
echo shar: Extracting \"games/g.9k.1\" \(158 characters\)
sed "s/^X//" >games/g.9k.1 <<'END_OF_games/g.9k.1'
X#!/usr/public/xgo -m -l
X9 0
X#
XB5
X. . . . . . . .
XO O O O . . . .
X. . @ O O O . .
X@ @ . @ @ O . .
X. . . . . O . .
X#
X0 0 0 0
X% black to play and live
X% 8 moves
END_OF_games/g.9k.1
if test 158 -ne `wc -c <games/g.9k.1`; then
    echo shar: \"games/g.9k.1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/save.10k -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/save.10k\"
else
echo shar: Extracting \"games/save.10k\" \(534 characters\)
sed "s/^X//" >games/save.10k <<'END_OF_games/save.10k'
X#!/usr/public/xgo -m -l
X; run by typing ".../file opponent@host"
X19 0
X#
X. . . . . . . . . . . . . . . . . . . 
X. . . . x o . . . . . . . . o x . . . 
X. . . x o o o . . . . . . o . x . . . 
X. . . x x x o . . x . . . . . x . . . 
X. . . . . . . . . . . . . o . . . . . 
X. . . x . . x . . x . . . . o . x . . 
X. . . . . . . . . . . . . . . . . . . 
X. . . . . . . . . o . . . . . . . . . 
X. . . x . . . . . x . . . . . . x . . 
X. . . . . . . . . . . . . . . . . . . 
X#
X0 0 0 0
X; comments printed to info window
X% white to play.  have fun.
END_OF_games/save.10k
if test 534 -ne `wc -c <games/save.10k`; then
    echo shar: \"games/save.10k\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f games/save.10k.1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"games/save.10k.1\"
else
echo shar: Extracting \"games/save.10k.1\" \(283 characters\)
sed "s/^X//" >games/save.10k.1 <<'END_OF_games/save.10k.1'
X#!/usr/public/xgo -m -l
X; run by typing ".../file opponent@host"
X9 0
X#
X. . . . . . . . .
X. . . o . . . . .
X. . x . o . o . .
X. . . . . . . x .
X. . x . x . x . .
X. x . . . . . . .
X. . o . o . x . .
X. . . . . o . . .
X. . . . . . . . .
X#
X0 0 0 0
X; comments printed to info window
X% By:
END_OF_games/save.10k.1
if test 283 -ne `wc -c <games/save.10k.1`; then
    echo shar: \"games/save.10k.1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f go.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"go.c\"
else
echo shar: Extracting \"go.c\" \(870 characters\)
sed "s/^X//" >go.c <<'END_OF_go.c'
X/*
X * $Header: go.c,v 1.2 88/02/13 12:48:46 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
Xmain (argc, argv, envp)
Xint argc;
Xchar **argv, **envp;
X{
X	/* GetStr();
X	savestr();
X	exit(0); */
X	if (argc <= 1) helpstart(argv);
X	parseline(argc,argv);
X
X	sockmask[0]= 1;
X
X	changes();
X
X	main0(argc,argv,envp);
X}
X
X/*
X * $Log:	go.c,v $
X * Revision 1.2  88/02/13  12:48:46  hale
X * added logging.
X * 
X */
X
END_OF_go.c
if test 870 -ne `wc -c <go.c`; then
    echo shar: \"go.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f handicap.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"handicap.c\"
else
echo shar: Extracting \"handicap.c\" \(985 characters\)
sed "s/^X//" >handicap.c <<'END_OF_handicap.c'
X/*
X * $Header: handicap.c,v 1.2 88/02/13 12:49:14 hale Exp $
X */
X
X#include "go.h"
X
X#define HC(x,y) { cx = (x); cy = (y); Handicap(!b(x,y)); }
X#define MAXHANDICAPS 9
X
Xsethandi()
X{
X	extern int handicaps,handin;
X	int h;
X	h = handicaps;
X	if (h>MAXHANDICAPS) h=MAXHANDICAPS;
X	SetStat(HANDICAP);
X
X	if (h-- >0) HC(handin,handin);
X	if (h-- >0) HC(MAXX-1-handin,MAXY-1-handin);
X	if (h-- >0) HC(MAXX-1-handin,handin);
X	if (h-- >0) HC(handin,MAXY-1-handin);
X	if (h-- >0) HC(MAXX/2,MAXY/2);
X	if (h-- >0) { 
X		HC(MAXX/2,MAXY/2);
X		HC(handin,MAXY/2);
X		HC(MAXX-1-handin,MAXY/2);
X	}
X	if (h-- >0) HC(MAXX/2,MAXY/2);
X	if (h-- >0) { 
X		HC(MAXX/2,MAXY/2);
X		HC(MAXX/2,handin);
X		HC(MAXX/2,MAXY-1-handin);
X	}
X	if (h-- >0) HC(MAXX/2,MAXY/2);
X	if (h-- >0) HC(handin+1,handin+1);
X	if (h-- >0) HC(MAXX-handin-2,MAXY-handin-2);
X	if (h-- >0) HC(MAXX-handin-2,handin+1);
X	if (h-- >0) HC(handin+1,MAXY-handin-2);
X}
X
X
X/*
X * $Log:	handicap.c,v $
X * Revision 1.2  88/02/13  12:49:14  hale
X * added logging.
X * 
X */
X
END_OF_handicap.c
if test 985 -ne `wc -c <handicap.c`; then
    echo shar: \"handicap.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f initboard.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"initboard.c\"
else
echo shar: Extracting \"initboard.c\" \(780 characters\)
sed "s/^X//" >initboard.c <<'END_OF_initboard.c'
X/*
X * $Header: initboard.c,v 1.2 88/02/13 12:49:32 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
XInitBoard(br)
XBOARD *br;
X{
X	int x,y;
X	for(y=0; y<MAXY; y++)
X		for(x=0; x<MAXX; x++)
X			br->d[x][y]=NONE;
X}
X
X/*
X * $Log:	initboard.c,v $
X * Revision 1.2  88/02/13  12:49:32  hale
X * added logging.
X * 
X */
X
END_OF_initboard.c
if test 780 -ne `wc -c <initboard.c`; then
    echo shar: \"initboard.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f kill.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"kill.c\"
else
echo shar: Extracting \"kill.c\" \(892 characters\)
sed "s/^X//" >kill.c <<'END_OF_kill.c'
X/*
X * $Header: kill.c,v 1.2 88/02/13 12:49:38 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
X
XKill(x,y,type)
Xint x,y,type;
X{
X	int t;
X	InitBoard(&marks);
X	t = !(type-1)+1;
X	if(!IsSafe(x-1,y)) killit(x-1,y,t);
X	if(!IsSafe(x+1,y)) killit(x+1,y,t);
X	if(!IsSafe(x,y-1)) killit(x,y-1,t);
X	if(!IsSafe(x,y+1)) killit(x,y+1,t);
X}
X
X/*
X * $Log:	kill.c,v $
X * Revision 1.2  88/02/13  12:49:38  hale
X * added logging.
X * 
X */
X
END_OF_kill.c
if test 892 -ne `wc -c <kill.c`; then
    echo shar: \"kill.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f killit.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"killit.c\"
else
echo shar: Extracting \"killit.c\" \(859 characters\)
sed "s/^X//" >killit.c <<'END_OF_killit.c'
X/*
X * $Header: killit.c,v 1.2 88/02/13 12:49:42 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
Xkillit(x,y,t)
Xint x,y,t;
X{
X	if (ir(x,y) && b(x,y)==t && t != NONE) {
X		setboard(x,y,NONE);
X		Plt(&board,x,y);
X		killit(x-1,y,t);
X		killit(x+1,y,t);
X		killit(x,y-1,t);
X		killit(x,y+1,t);
X	}
X}
X
X/*
X * $Log:	killit.c,v $
X * Revision 1.2  88/02/13  12:49:42  hale
X * added logging.
X * 
X */
X
END_OF_killit.c
if test 859 -ne `wc -c <killit.c`; then
    echo shar: \"killit.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f movecur.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"movecur.c\"
else
echo shar: Extracting \"movecur.c\" \(779 characters\)
sed "s/^X//" >movecur.c <<'END_OF_movecur.c'
X/*
X * $Header: movecur.c,v 1.2 88/02/13 12:50:35 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
Xmovecur(x,y)
Xint x,y;
X{
X	cx+=x;
X	if ((cx<0)||(cx>=MAXX))
X		cx-=x;
X	cy+=y;
X	if ((cy<0)||(cy>=MAXY))
X		cy-=y;
X}
X
X/*
X * $Log:	movecur.c,v $
X * Revision 1.2  88/02/13  12:50:35  hale
X * added logging.
X * 
X */
X
END_OF_movecur.c
if test 779 -ne `wc -c <movecur.c`; then
    echo shar: \"movecur.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f moveto.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"moveto.c\"
else
echo shar: Extracting \"moveto.c\" \(998 characters\)
sed "s/^X//" >moveto.c <<'END_OF_moveto.c'
X/*
X * $Header: moveto.c,v 3.0 88/03/10 12:07:40 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
Xmoveto(x,y)
X{
X	move(y+1,(x*2)+1);
X}
X
X/*
X * $Log:	moveto.c,v $
X * Revision 3.0  88/03/10  12:07:40  hale
X * Added save games, a few changes to the I/O,
X * added load and clear options.  Not thouroughly tested, though, and
X * I think a few bugs are in the load code.  A library of sample problems
X * has been started and saved with the working directory.
X * 
X * Revision 1.2  88/02/13  12:50:38  hale
X * added logging.
X * 
X */
X
END_OF_moveto.c
if test 998 -ne `wc -c <moveto.c`; then
    echo shar: \"moveto.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f nomove.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"nomove.c\"
else
echo shar: Extracting \"nomove.c\" \(931 characters\)
sed "s/^X//" >nomove.c <<'END_OF_nomove.c'
X/*
X * $Header: nomove.c,v 1.2 88/02/13 12:50:42 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
XNoMove(x,y,c,d)
Xint x,y,c,d;
X{
X	return ( !IsSafe(x,y) &&
X		nmv0(x-1,y,c,d) &&
X		nmv0(x+1,y,c,d) &&
X		nmv0(x,y-1,c,d) &&
X		nmv0(x,y+1,c,d));
X}
X
Xnmv0(x,y,c,d)
Xint x,y,c,d;
X{
X	return (!ir(x,y) ||
X		   (b(x,y)==c && IsSafe(x,y)) ||
X		   (b(x,y)==d && !IsSafe(x,y)));
X}
X/*
X * $Log:	nomove.c,v $
X * Revision 1.2  88/02/13  12:50:42  hale
X * added logging.
X * 
X */
X
END_OF_nomove.c
if test 931 -ne `wc -c <nomove.c`; then
    echo shar: \"nomove.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f plt.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"plt.c\"
else
echo shar: Extracting \"plt.c\" \(1000 characters\)
sed "s/^X//" >plt.c <<'END_OF_plt.c'
X/*
X * $Header: plt.c,v 1.2 88/02/13 12:51:17 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
XPlt(br,x,y)
XBOARD *br;
Xint x,y;
X{
X	char c;
X	moveto(x,y);
X	c =(pieces[br->d[x][y]]);
X	if (c=='.') c = cp(x,y);
X	addch (c);
X}
X
Xcp(x,y)
Xint x,y;
X{
X	extern int handin;
X	int r;
X	if ((x==handin || x==MAXX-1-handin || x == (MAXX-1)/2) &&
X	   (y==handin || y==MAXY-1-handin || y == (MAXY-1)/2)) {
X		return ('*');
X	} else {
X		return ('.');
X	}
X}
X/*
X * $Log:	plt.c,v $
X * Revision 1.2  88/02/13  12:51:17  hale
X * added logging.
X * 
X * 
X */
X
END_OF_plt.c
if test 1000 -ne `wc -c <plt.c`; then
    echo shar: \"plt.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f setboard.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"setboard.c\"
else
echo shar: Extracting \"setboard.c\" \(818 characters\)
sed "s/^X//" >setboard.c <<'END_OF_setboard.c'
X/*
X * $Header: setboard.c,v 1.2 88/02/13 12:51:53 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
Xsetboard(x,y,p)
Xint x,y;
Xchar p;
X{
X	if ((p<1 || p>2) && b(x,y)==1 || b(x,y)==2) {
X		hama[!(b(x,y)-1)]++;
X	}
X	board.d[x][y]=p;
X	Plt(&board,x,y);
X}
X
X/*
X * $Log:	setboard.c,v $
X * Revision 1.2  88/02/13  12:51:53  hale
X * added logging.
X * 
X */
X
END_OF_setboard.c
if test 818 -ne `wc -c <setboard.c`; then
    echo shar: \"setboard.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f status.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"status.c\"
else
echo shar: Extracting \"status.c\" \(818 characters\)
sed "s/^X//" >status.c <<'END_OF_status.c'
X/*
X * $Header: status.c,v 1.2 88/02/13 12:51:57 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
X
XAreWe(s)
Xint s;
X{
X	return (status & s);
X}
X
XSetStat(s)
Xint s;
X{
X	status = status | s;
X}
X
XClrStat(s)
Xint s;
X{
X	status = status & ~s;
X}
X
X/*
X * $Log:	status.c,v $
X * Revision 1.2  88/02/13  12:51:57  hale
X * added handling of new buttons.
X * 
X */
X
END_OF_status.c
if test 818 -ne `wc -c <status.c`; then
    echo shar: \"status.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f tally.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"tally.c\"
else
echo shar: Extracting \"tally.c\" \(784 characters\)
sed "s/^X//" >tally.c <<'END_OF_tally.c'
X/*
X * $Header: tally.c,v 1.2 88/02/13 12:52:31 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
XTally()
X{
X	int i,j;
X	for (i=0; i<MAXX; i++) 
X	    for (j=0; j<MAXY; j++) 
X		if (b(i,j)==NONE) fill(i,j,Owner(i,j));
X}
X
X/*
X * $Log:	tally.c,v $
X * Revision 1.2  88/02/13  12:52:31  hale
X * added logging.
X * 
X */
X
END_OF_tally.c
if test 784 -ne `wc -c <tally.c`; then
    echo shar: \"tally.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f util.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"util.c\"
else
echo shar: Extracting \"util.c\" \(1081 characters\)
sed "s/^X//" >util.c <<'END_OF_util.c'
X/*
X * $Header: util.c,v 1.2 88/02/13 12:52:42 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X#define FD_INPUT 0
X
XGetAKey()
X{
X	addmes(HITAKEYMES);
X	return(GetAKey0());
X}
X
XGetAKey0()
X{
X	char c;
X	if (read(FD_INPUT,&c,1)<=0) {
X		SEND(MEXIT);
X		error("Aborting- End of File read.\n");
X	}
X	return(c);
X}
X
Xflushkey()
X{
X	int i=0;
X	ioctl(FD_INPUT,TIOCFLUSH,&i);
X}
X
XSetWhtCur()
X{
X}
XSetBlkCur()
X{
X}
X
XDoRedraw()
X{
X		touchwin(stdscr);
X		clear();
X		PrintBoard(&board);
X}
X
XBeep()
X{
X	mvaddch(0,0,07);
X}
X
XREFRESH()
X{
X	refresh();
X}
X/*
X * $Log:	util.c,v $
X * Revision 1.2  88/02/13  12:52:42  hale
X * added logging.
X * 
X */
X
END_OF_util.c
if test 1081 -ne `wc -c <util.c`; then
    echo shar: \"util.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xexit.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xexit.c\"
else
echo shar: Extracting \"xexit.c\" \(737 characters\)
sed "s/^X//" >xexit.c <<'END_OF_xexit.c'
X/*
X * $Header: xexit.c,v 1.2 88/02/13 12:54:07 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "xgo.h"
X
XExit()
X{
X	EndWin();
X	if (dis != NULL) XCloseDisplay(dis);
X	exit(0);
X}
X
X/*
X * $Log:	xexit.c,v $
X * Revision 1.2  88/02/13  12:54:07  hale
X * added logging.
X * 
X */
X
END_OF_xexit.c
if test 737 -ne `wc -c <xexit.c`; then
    echo shar: \"xexit.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xgo.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xgo.c\"
else
echo shar: Extracting \"xgo.c\" \(985 characters\)
sed "s/^X//" >xgo.c <<'END_OF_xgo.c'
X/*
X * $Header: xgo.c,v 1.2 88/02/13 12:54:27 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "xgo.h"
X
X
Xmain (argc, argv, envp)
Xint argc;
Xchar **argv, **envp;
X{
X
X	char name[MAXLINE];
X
X
X	if (argc <= 1) helpstart(argv);
X	parseline(argc,argv);
X
X
X	dis = XOpenDisplay(display);
X	if (dis == NULL) error("\nYou need to be running X to execute this program.\n");
X	sockmask[0]= 1 << dpyno();
X
X	changes();
X
X	main0(argc, argv, envp);
X}
X
X/*
X * $Log:	xgo.c,v $
X * Revision 1.2  88/02/13  12:54:27  hale
X * added logging.
X * 
X */
X
END_OF_xgo.c
if test 985 -ne `wc -c <xgo.c`; then
    echo shar: \"xgo.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xinit.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xinit.c\"
else
echo shar: Extracting \"xinit.c\" \(1029 characters\)
sed "s/^X//" >xinit.c <<'END_OF_xinit.c'
X/*
X * $Header: xinit.c,v 1.3 88/02/19 13:49:31 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "xgo.h"
X
XInit()
X{
X	InitW();
X	InitBit();
X
X	fi = XOpenFont("vtsingle");
X
X	MAXX=dimensions; MAXY=dimensions;
X	hama[0]=0;
X	hama[1]=0;
X
X	InitBoard(&board);
X	InitLoop();
X}
X
X/*
X * $Log:	xinit.c,v $
X * Revision 1.3  88/02/19  13:49:31  hale
X * Added io changes for loading games.
X * Load game is cleaned up.  Variable board
X * sizes and formats available in save game
X * as well as printed comments.
X * 
X * Revision 1.2  88/02/13  12:54:34  hale
X * added logging.
X * 
X */
X
END_OF_xinit.c
if test 1029 -ne `wc -c <xinit.c`; then
    echo shar: \"xinit.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xkeyp.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xkeyp.c\"
else
echo shar: Extracting \"xkeyp.c\" \(830 characters\)
sed "s/^X//" >xkeyp.c <<'END_OF_xkeyp.c'
X/*
X * $Header: xkeyp.c,v 1.2 88/02/13 12:54:50 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "xgo.h"
X#include <strings.h>
X
Xchar line[MAXLINE]="";
XKeyPress(ev)
XXKeyPressedEvent *ev;
X{
X	char *temp;
X	int nb;
X	temp = XLookupMapping(ev, &nb);
X	if (nb!=0) domesg(*temp);
X}
X/*
X * $Log:	xkeyp.c,v $
X * Revision 1.2  88/02/13  12:54:50  hale
X * added logging.
X * 
X */
X
END_OF_xkeyp.c
if test 830 -ne `wc -c <xkeyp.c`; then
    echo shar: \"xkeyp.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xpiecenum.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xpiecenum.h\"
else
echo shar: Extracting \"xpiecenum.h\" \(961 characters\)
sed "s/^X//" >xpiecenum.h <<'END_OF_xpiecenum.h'
X/*
X * $Header: xpiecenum.h,v 1.2 88/02/13 12:57:42 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define Smask 0
X#define Smask0 1
X#define Spiecemask 2
X#define Sintersect 3
X#define Spoint 4
X#define Sblack 6
X#define Swhite 5
X#define Sdl 7
X#define Sdr 8
X#define Sul 9
X#define Sur 10
X#define Su 11
X#define Sr 12
X#define Sd 13
X#define Sl 14
X#define Sneu 15
X#define Sfbl 16
X#define Sfwh 17
X#define Sbutton 18
X/*
X * $Log:	xpiecenum.h,v $
X * Revision 1.2  88/02/13  12:57:42  hale
X * added logging.
X * 
X */
X
END_OF_xpiecenum.h
if test 961 -ne `wc -c <xpiecenum.h`; then
    echo shar: \"xpiecenum.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xplt.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xplt.c\"
else
echo shar: Extracting \"xplt.c\" \(732 characters\)
sed "s/^X//" >xplt.c <<'END_OF_xplt.c'
X/*
X * $Header: xplt.c,v 1.2 88/02/13 12:55:02 hale Locked $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "xgo.h"
X
XPlt(br,x,y)
XBOARD *br;
Xint x,y;
X{
X	PltPiece(x,y,br->d[x][y]);
X}
X
X/*
X * $Log:	xplt.c,v $
X * Revision 1.2  88/02/13  12:55:02  hale
X * added logging.
X * 
X */
X
END_OF_xplt.c
if test 732 -ne `wc -c <xplt.c`; then
    echo shar: \"xplt.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xprintboard.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xprintboard.c\"
else
echo shar: Extracting \"xprintboard.c\" \(1067 characters\)
sed "s/^X//" >xprintboard.c <<'END_OF_xprintboard.c'
X/*
X * $Header: xprintboard.c,v 1.2 88/02/13 12:55:10 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "xgo.h"
X
XPrintBoard(br)
XBOARD *br;
X{
X	int x,y;
X	for(y=0; y<MAXY; y++)
X		for(x=0; x<MAXX; x++)
X			Plt(br,x,y);
X	initmesg();
X}
X
XXPrintBoard(x1,y1,x2,y2,br)
Xint x1,y1,x2,y2;
XBOARD *br;
X{
X	int x,y;
X	if (y1 < 0) y1 = 0;
X	if (y2 > MAXY-1) y2 = MAXY-1;
X	if (x1 < 0) x1 = 0;
X	if (x2 > MAXX-1) x2 = MAXX-1;
X	for(y=y1; y<=y2; y++)
X	    for(x=x1; x<=x2; x++)
X			Plt(br,x,y);
X	initmesg();
X}
X
Xprintscore()
X{
X	
X}
X/*
X * $Log:	xprintboard.c,v $
X * Revision 1.2  88/02/13  12:55:10  hale
X * added logging.
X * 
X */
X
END_OF_xprintboard.c
if test 1067 -ne `wc -c <xprintboard.c`; then
    echo shar: \"xprintboard.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xtraps.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xtraps.c\"
else
echo shar: Extracting \"xtraps.c\" \(990 characters\)
sed "s/^X//" >xtraps.c <<'END_OF_xtraps.c'
X/*
X * $Header: xtraps.c,v 1.2 88/02/13 12:55:18 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#ifndef lint
Xstatic char rcsid[] = "$Header: xtraps.c,v 1.2 88/02/13 12:55:18 hale Exp $";
X#endif
X
X#include "go.h"
X#include <signal.h>
X
Xtrap_sigint ()
X{
X	signal (SIGINT, SIG_IGN);
X		SEND(MEXIT);
X		Exit();
X}
X
X
Xts_tp ()
X{
X	int y, x;
X	char c;
X
X	signal (SIGTSTP, SIG_IGN);
X
X	resetty();
X
X	sleep (-1);
X
X	setmode();
X
X
X	signal (SIGINT, ts_tp);
X}
X
X
X/*
X * $Log:	xtraps.c,v $
X * Revision 1.2  88/02/13  12:55:18  hale
X * added logging.
X * 
X */
X
END_OF_xtraps.c
if test 990 -ne `wc -c <xtraps.c`; then
    echo shar: \"xtraps.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xvar.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xvar.c\"
else
echo shar: Extracting \"xvar.c\" \(1064 characters\)
sed "s/^X//" >xvar.c <<'END_OF_xvar.c'
X/*
X * $Header: xvar.c,v 1.3 88/02/19 13:49:52 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include <X/Xlib.h>
X
XWindow Wboard,Wtalk,Wtalk1,Wmesg,Waccept,Wdecline,
X	Wscore,Wquit,Wtally,Wpass,Wcancel,Wplay,
X	Wexit,Wswitch,Wshow,Wresign,Wsave, Wload,
X	Wclear;
XFontInfo *fi;
XDisplay *dis;
X
Xint turn=0;
X/*
X * $Log:	xvar.c,v $
X * Revision 1.3  88/02/19  13:49:52  hale
X * Added io changes for loading games.
X * Load game is cleaned up.  Variable board
X * sizes and formats available in save game
X * as well as printed comments.
X * 
X * Revision 1.2  88/02/13  12:55:27  hale
X * new window variables.
X * 
X */
X
END_OF_xvar.c
if test 1064 -ne `wc -c <xvar.c`; then
    echo shar: \"xvar.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of archive 4 \(of 4\).
cp /dev/null ark4isdone
MISSING=""
for I in 1 2 3 4 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 4 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0