From 83f2ef7227030c4b88ec1006e49d9304aa6f7be0 Mon Sep 17 00:00:00 2001 From: dholland Date: Sat, 13 Oct 2012 19:19:38 +0000 Subject: Pass the move info around instead of using it as a global. --- backgammon/common_source/init.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'backgammon/common_source/init.c') 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; +} -- cgit v1.2.3