diff options
author | lukem <lukem@NetBSD.org> | 1997-10-10 13:36:01 +0000 |
---|---|---|
committer | lukem <lukem@NetBSD.org> | 1997-10-10 13:36:01 +0000 |
commit | 3936117409cf27503dff2c5d4d2ba20840a85873 (patch) | |
tree | 36799758f37408f4211a1a72c734889dc0eac7fe /gomoku/makemove.c | |
parent | 34ef7ac7fd8bd4c426cd292ac4eb658d67867eab (diff) | |
download | bsdgames-darwin-3936117409cf27503dff2c5d4d2ba20840a85873.tar.gz bsdgames-darwin-3936117409cf27503dff2c5d4d2ba20840a85873.tar.zst bsdgames-darwin-3936117409cf27503dff2c5d4d2ba20840a85873.zip |
WARNSify
Diffstat (limited to 'gomoku/makemove.c')
-rw-r--r-- | gomoku/makemove.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gomoku/makemove.c b/gomoku/makemove.c index c1be646e..ca270068 100644 --- a/gomoku/makemove.c +++ b/gomoku/makemove.c @@ -1,4 +1,4 @@ -/* $NetBSD: makemove.c,v 1.3 1997/01/03 01:35:29 cgd Exp $ */ +/* $NetBSD: makemove.c,v 1.4 1997/10/10 13:36:05 lukem Exp $ */ /* * Copyright (c) 1994 @@ -36,11 +36,12 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)makemove.c 8.2 (Berkeley) 5/3/95"; #else -static char rcsid[] = "$NetBSD: makemove.c,v 1.3 1997/01/03 01:35:29 cgd Exp $"; +__RCSID("$NetBSD: makemove.c,v 1.4 1997/10/10 13:36:05 lukem Exp $"); #endif #endif /* not lint */ @@ -61,15 +62,16 @@ int weight[5] = { 0, 1, 7, 22, 100 }; * WIN The the winning move was just played. * TIE The game is a tie. */ +int makemove(us, mv) int us, mv; { - register struct spotstr *sp, *fsp; - register union comboval *cp; + struct spotstr *sp, *fsp; + union comboval *cp; struct spotstr *osp; struct combostr *cbp, *cbp1; union comboval *cp1; - register int i, f, r, d, n; + int i, f, r, d, n; int space, val, bmask; /* check for end of game */ @@ -218,15 +220,17 @@ makemove(us, mv) /* * fix up the overlap array due to updating spot osp. */ +void update_overlap(osp) struct spotstr *osp; { - register struct spotstr *sp, *sp1, *sp2; - register int i, f, r, r1, d, d1, n; + struct spotstr *sp, *sp1, *sp2; + int i, f, r, r1, d, d1, n; int a, b, bmask, bmask1; struct spotstr *esp; char *str; + esp = NULL; for (r = 4; --r >= 0; ) { /* for each direction */ d = dd[r]; sp1 = osp; |