home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume8
/
mgt
/
part01
/
board.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-02-23
|
1KB
|
60 lines
/*
"mgt" Copyright 1990 Shodan
All Rights Reserved.
Program by Greg Hale
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that this entire comment and copyright notice appear in all
copies and that both that copyright notice and this permission notice
appear in supporting documentation. No representations are made about
the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
Please send copies of extensions to:
hale@scam.berkeley.edu
128.32.138.4 scam.berkeley.edu sting sting.Berkeley.EDU
Donations for the 'From My Go Teacher' series may be sent to:
Shodan
P.O. Box 4456
Berkeley, CA 94704
(415) 849-9475
*/
#include "mgt.h"
#include "var.h"
FUNCTION piece boardSet(b,i,j,p)
pBoard b;
int i,j;
piece p;
{
register piece t;
t = b->b[i][j];
b->b[i][j] = p;
return t;
}
FUNCTION piece boardGet(b,i,j)
pBoard b;
int i,j;
{
return b->b[i][j];
}
FUNCTION void boardClear(b)
pBoard b;
{
int i,j;
for(i=boardsize; i--;)
for (j=boardsize; j--;)
b->b[i][j] = P_NOTHING;
}