summaryrefslogtreecommitdiffstats
path: root/backgammon
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>2004-01-01 15:59:58 +0000
committerjsm <jsm@NetBSD.org>2004-01-01 15:59:58 +0000
commit077191ff95ab7ff68ece98bbcec93a70a501ec7d (patch)
tree18cffd714fd3b37f7c10f3c7c61b8fcd9f8b9768 /backgammon
parent28d6f94123001e6fec24a7bb5c85dc24422a54a8 (diff)
downloadbsdgames-darwin-077191ff95ab7ff68ece98bbcec93a70a501ec7d.tar.gz
bsdgames-darwin-077191ff95ab7ff68ece98bbcec93a70a501ec7d.tar.zst
bsdgames-darwin-077191ff95ab7ff68ece98bbcec93a70a501ec7d.zip
Only score as a Gammon or a Backgammon if the opponent hasn't removed
any pieces, not if the opponent has removed pieces but has had a piece knocked back to the bar afterwards. Fixes Debian bug 185101 from Konstantin Seiler <list@kseiler.de>.
Diffstat (limited to 'backgammon')
-rw-r--r--backgammon/backgammon/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backgammon/backgammon/main.c b/backgammon/backgammon/main.c
index 4b0dc1aa..1a5237af 100644
--- a/backgammon/backgammon/main.c
+++ b/backgammon/backgammon/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.18 2003/08/07 09:36:56 agc Exp $ */
+/* $NetBSD: main.c,v 1.19 2004/01/01 15:59:58 jsm Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: main.c,v 1.18 2003/08/07 09:36:56 agc Exp $");
+__RCSID("$NetBSD: main.c,v 1.19 2004/01/01 15:59:58 jsm Exp $");
#endif
#endif /* not lint */
@@ -472,7 +472,7 @@ main(argc, argv)
/* compute game value */
if (tflag)
curmove(20, 0);
- if (*offopp == 15 && *offptr <= 0) {
+ if (*offopp == 15 && (*offptr == 0 || *offptr == -15)) {
if (mflag) {
writel(bgammon);
gvalue *= 3;