diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 1999-09-30 03:24:00 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 1999-09-30 03:24:00 +0000 |
commit | b441e4909c253ad60b7d814cd69060b4a438e919 (patch) | |
tree | 89241c8020db1a24b3763bc98267db5b147adbcd | |
parent | 10720df4e966a1a6cbf9d4b0817e3c6d7d1dd8ab (diff) |
Disallow "Go" after "Right of Way" and change Battle Pile status to "Go" when
appropriate when playing "Right of Way".
-rw-r--r-- | games/mille/move.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/games/mille/move.c b/games/mille/move.c index eb347b1e44c..f41d1152c2f 100644 --- a/games/mille/move.c +++ b/games/mille/move.c @@ -1,4 +1,4 @@ -/* $OpenBSD: move.c,v 1.5 1999/09/25 15:52:20 pjanzen Exp $ */ +/* $OpenBSD: move.c,v 1.6 1999/09/30 03:23:59 pjanzen Exp $ */ /* $NetBSD: move.c,v 1.4 1995/03/24 05:01:57 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: move.c,v 1.5 1999/09/25 15:52:20 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: move.c,v 1.6 1999/09/30 03:23:59 pjanzen Exp $"; #endif #endif /* not lint */ @@ -251,6 +251,8 @@ mustpick: && !isrepair(pp->battle)) return error("cannot play \"Go\" on a \"%s\"", C_name[pp->battle]); + if (pp->safety[S_RIGHT_WAY] == S_PLAYED) + return error("\"Go\" implied by \"Right of Way\""); pp->battle = C_GO; pp->can_go = TRUE; break; @@ -321,10 +323,12 @@ protected: pp->speed = C_INIT; if (pp->battle == C_STOP || pp->battle == C_INIT) { pp->can_go = TRUE; - pp->battle = C_INIT; + pp->battle = C_GO; } - if (!pp->can_go && isrepair(pp->battle)) + if (!pp->can_go && isrepair(pp->battle)) { pp->can_go = TRUE; + pp->battle = C_GO; + } } Next = -1; break; |