|
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 b
Length: 3153 (0xc51) Types: TextFile Names: »bidding.h«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Bidding/bidding.h«
/* bidding.h */ /* Bridge Bidder Version 3.0 by John Oswalt and Nathan Glasser ..!sun!megatest!jao (usenet) nathan@brokaw.lcs.mit.edu (internet) nathan@mit-eddie.uucp (usenet) June, 1989 ------------------------------------------------------------------------------ Copyright 1988, 1989 by Nathan Glasser and John Oswalt. You may feel free to distribute this program in its current form. Please do not remove this copyright information. */ #include <stdio.h> #include <ctype.h> #ifdef MSDOS #include <string.h> #include <stdlib.h> #define random rand #define srandom srand #define index strchr #else #include <strings.h> #endif #define LOGFILE "bidding.log" /* Ranks */ #define JACK 11 #define QUEEN 12 #define KING 13 #define ACE 14 /* Suits */ #define SPADES 0 #define HEARTS 1 #define DIAMONDS 2 #define CLUBS 3 #define NOTRUMP 4 #define RANK_USED 4 /* More "Suits" */ #define DOUBLE 5 #define REDOUBLE 6 #define PASS 7 /* Vulnerabilities */ #define FIRSTPAIR 0 #define SECONDPAIR 1 #define RELATIVE 1 #define NEITHER 2 #define BOTH 3 /* Types of bidding display */ #define BIDDING 0 #define LEADING 1 #define PASSING 2 struct card_or_bid { int rank; int suit; }; typedef struct card_or_bid card; typedef struct bid { struct card_or_bid bid; struct bid *next,*prev; } bid; typedef card hand[13]; typedef struct deal { hand hands[4]; int vulnerability; bid *bids; int num_bids; int bidding_done; card opening_lead; } deal; /* Pointer to function returning int */ typedef int (*PFI)(); /* Deal type information structure */ struct deal_type { char *deal_name; /* Name of deal type */ PFI predeal_func,hand_func; /* Predeal function and hand function */ int param_max; /* Maximum parameter; Negative => none */ /* If 0, num_deals is supplied */ char *description; /* Documentation string */ }; extern int cardsused[52]; extern int hand_setup[4]; extern int cardsleft; /* Individual users may want to modify these values for their system or their personal preferences. */ /* If you wish to use formfeeds to clear the screen instead of repeated newlines, comment out the definition of SCREEN_CLEAR_SIZE. Otherwise this value indicates the number of newlines to use for this purpose. */ #define SCREEN_CLEAR_SIZE 24 /* If you wish the bids for the displayed hand to always be lined up in the first column, with dashes on the first display line for bids of players before the dealer, define LISTING_FIRST_COL. If you wish the bids to always start in the first column, with the bids for the displayed hand always appearing in the same column which can be any column, as appropriate, define LISTING_ANY_COL. Make sure exactly one of these two is defined. */ /* Using LISTING_FIRST_COL, a bidding sequence might look like this: *You* LHO Partner RHO Bidding: -------------------------------- - - - 1H P 1S 2C 2H ? Using LISTING_ANY_COL, the same sequence looks like: RHO *You* LHO Partner Bidding: -------------------------------- 1H P 1S 2C 2H */ #define LISTING_FIRST_COL /* #define LISTING_ANY_COL */