|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T n
Length: 801 (0x321) Types: TextFile Names: »nobs.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Nobs/nobs.c«
/* * nobs - play cribbage. */ #include <stdio.h> #include "defs.h" #include "globs.h" extern int programdiscard(); extern int humandiscard(); usage() { #ifdef NOHINT fprintf(stderr,"usage: nobs [-v]\n"); #else fprintf(stderr,"usage: nobs [-h] [-v]\n"); #endif exit(-1); } main(argc,argv) int argc; char **argv; { while (--argc) { if ('-'==**++argv) switch(*++*argv) { case 'v': printf("Nobs Version %s\n", version); exit(0); #ifndef NOHINT case 'h': hflag = 1; break; #endif default: usage(); } else break; } if (argc) usage(); initrand(); initwins(); dealer = randint(2); playertype[0] = PROGRAM; playertype[1] = HUMAN; dscfunc[PROGRAM] = programdiscard; dscfunc[HUMAN] = humandiscard; for (quitflag=0; !quitflag; ) playgame(); termwins(); exit(0); }