mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
/home/otto/ok
This commit is contained in:
parent
695525cea3
commit
0731e9084c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: main.c,v 1.17 2013/08/29 20:22:09 naddy Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.18 2015/06/26 19:18:03 otto Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -265,7 +265,7 @@ main (argc,argv)
|
||||
hflag = 1;
|
||||
}
|
||||
/* if allowed, give him a chance to double */
|
||||
if (dlast != cturn && gvalue < 64) {
|
||||
if (dflag && dlast != cturn && gvalue < 64) {
|
||||
move(cturn == -1 ? 18: 19, 0);
|
||||
addstr(*Colorptr);
|
||||
c = readc();
|
||||
@ -287,8 +287,7 @@ main (argc,argv)
|
||||
break;
|
||||
|
||||
case 'D': /* double */
|
||||
if (dflag != 0)
|
||||
dble();
|
||||
dble();
|
||||
break;
|
||||
|
||||
case ' ': /* roll */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: move.c,v 1.10 2009/10/27 23:59:23 deraadt Exp $ */
|
||||
/* $OpenBSD: move.c,v 1.11 2015/06/26 19:18:03 otto Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -69,8 +69,9 @@ domove(okay)
|
||||
int l = 0; /* last man */
|
||||
|
||||
bestmove = -9999999.;
|
||||
if (okay && dflag != 0) { /* see if comp should double */
|
||||
if (gvalue < 64 && dlast != cturn && dblgood()) {
|
||||
if (okay) {
|
||||
/* see if comp should double */
|
||||
if (dflag && gvalue < 64 && dlast != cturn && dblgood()) {
|
||||
addstr(*Colorptr);
|
||||
dble(); /* double */
|
||||
/* return if declined */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: save.c,v 1.11 2014/11/16 04:49:48 guenther Exp $ */
|
||||
/* $OpenBSD: save.c,v 1.12 2015/06/26 19:18:03 otto Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -112,6 +112,7 @@ save(n)
|
||||
write(fdesc, in, sizeof(in));
|
||||
write(fdesc, dice, sizeof(dice));
|
||||
write(fdesc, &cturn, sizeof(cturn));
|
||||
write(fdesc, &dflag, sizeof(dflag));
|
||||
write(fdesc, &dlast, sizeof(dlast));
|
||||
write(fdesc, &pnum, sizeof(pnum));
|
||||
write(fdesc, &rscore, sizeof(rscore));
|
||||
@ -138,6 +139,7 @@ recover(s)
|
||||
read(fdesc, in, sizeof(in));
|
||||
read(fdesc, dice, sizeof(dice));
|
||||
read(fdesc, &cturn, sizeof(cturn));
|
||||
read(fdesc, &dflag, sizeof(dflag));
|
||||
read(fdesc, &dlast, sizeof(dlast));
|
||||
read(fdesc, &pnum, sizeof(pnum));
|
||||
read(fdesc, &rscore, sizeof(rscore));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: subs.c,v 1.19 2013/11/27 13:32:02 okan Exp $ */
|
||||
/* $OpenBSD: subs.c,v 1.20 2015/06/26 19:18:03 otto Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -98,6 +98,8 @@ gwrite()
|
||||
addstr(color[1]);
|
||||
addstr(" doubled last.");
|
||||
} else {
|
||||
if (!dflag)
|
||||
printw("[No doubling.] ");
|
||||
switch (pnum) {
|
||||
case -1: /* player is red */
|
||||
addstr(plred);
|
||||
|
Loading…
Reference in New Issue
Block a user