diff options
author | dholland <dholland@NetBSD.org> | 2012-10-13 19:19:38 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2012-10-13 19:19:38 +0000 |
commit | 83f2ef7227030c4b88ec1006e49d9304aa6f7be0 (patch) | |
tree | 0f69865c3aa850090b15e95a6ae7a6d599c95e11 /backgammon/common_source/init.c | |
parent | f70c1c7e831fd972c1f452e87709f5fe158e6f4d (diff) | |
download | bsdgames-darwin-83f2ef7227030c4b88ec1006e49d9304aa6f7be0.tar.gz bsdgames-darwin-83f2ef7227030c4b88ec1006e49d9304aa6f7be0.tar.zst bsdgames-darwin-83f2ef7227030c4b88ec1006e49d9304aa6f7be0.zip |
Pass the move info around instead of using it as a global.
Diffstat (limited to 'backgammon/common_source/init.c')
-rw-r--r-- | backgammon/common_source/init.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/backgammon/common_source/init.c b/backgammon/common_source/init.c index 5cdbfb36..648515f2 100644 --- a/backgammon/common_source/init.c +++ b/backgammon/common_source/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.9 2012/10/13 18:44:15 dholland Exp $ */ +/* $NetBSD: init.c,v 1.10 2012/10/13 19:19:39 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: init.c,v 1.9 2012/10/13 18:44:15 dholland Exp $"); +__RCSID("$NetBSD: init.c,v 1.10 2012/10/13 19:19:39 dholland Exp $"); #endif #endif /* not lint */ @@ -93,3 +93,15 @@ int rscore; int table[6][6]; int wscore; struct termios old, noech, raw; + +void +move_init(struct move *mm) +{ + mm->D0 = 0; + mm->D1 = 0; + mm->mvlim = 0; + mm->p[0] = mm->p[1] = mm->p[2] = mm->p[3] = mm->p[4] = 0; + mm->g[0] = mm->g[1] = mm->g[2] = mm->g[3] = mm->g[4] = 0; + mm->h[0] = mm->h[1] = mm->h[2] = mm->h[3] = 0; + mm->d0 = 0; +} |