summaryrefslogtreecommitdiff
path: root/games/cribbage/support.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2001-08-10 23:50:23 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2001-08-10 23:50:23 +0000
commit061fdc3f48491abc4b4f22bb6107678c71170609 (patch)
tree9656542c7e3320eb49c8daab78b02c32788ce8e6 /games/cribbage/support.c
parentbf242e276aac1e0bd76102f66c47f225bc1b4319 (diff)
-m option for muggins
better user input parsing man page tidying and syncing of rules to Hoyle's typo and context correction in "Hoyle's" transcription
Diffstat (limited to 'games/cribbage/support.c')
-rw-r--r--games/cribbage/support.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/games/cribbage/support.c b/games/cribbage/support.c
index 4fe305877a1..cebc710659c 100644
--- a/games/cribbage/support.c
+++ b/games/cribbage/support.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: support.c,v 1.4 1999/11/29 06:42:20 millert Exp $ */
+/* $OpenBSD: support.c,v 1.5 2001/08/10 23:50:22 pjanzen Exp $ */
/* $NetBSD: support.c,v 1.3 1995/03/21 15:08:59 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)support.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: support.c,v 1.4 1999/11/29 06:42:20 millert Exp $";
+static char rcsid[] = "$OpenBSD: support.c,v 1.5 2001/08/10 23:50:22 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -144,12 +144,18 @@ plyrhand(hand, s)
if (i != j) {
if (i < j) {
win = chkscr(&pscore, i);
- msg("It's really only %d points; I get %d", i, 2);
- if (!win)
+ if (!win) {
+ msg("It's really only %d points; I get %d", i, 2);
win = chkscr(&cscore, 2);
+ } else
+ msg("It's really only %d points.", i);
} else {
win = chkscr(&pscore, j);
msg("You should have taken %d, not %d!", i, j);
+ if (!win && muggins) {
+ msg("Muggins! I score %d", i - j);
+ win = chkscr(&cscore, i - j);
+ }
}
if (explain)
msg("Explanation: %s", expl);