DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T c

⟦a01b20875⟧ TextFile

    Length: 1717 (0x6b5)
    Types: TextFile
    Names: »challenge.h«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Challenge/challenge.h« 

TextFile

#include <curses.h>
#include <signal.h>
#include <ctype.h>

#define	COMPUTER	3
#define TABLE		9
#define HUMAN		15

#define MARGIN		7
#define R_MARGIN	57
#define COMMAND_LINE	22
#define COMMENT_LINE	20
#define COMMAND_POS	10

#define MAX_CARD	32
#define MAX_SUIT	8

#define	SPADES		0
#define CLUBS		1
#define DIAMONDS	2
#define HEARTS		3

#define	ACE		0
#define KING		1
#define QUEEN		2
#define JACK		3
#define C_10		4
#define C_9		5
#define C_8		6
#define C_7		7
#define C_6		8
#define C_5		9
#define C_4		10
#define C_3		11
#define C_2		12

#define PICK_UP		MAX_CARD
#define RESIGN		(PICK_UP+1)
#define DRAWN		(PICK_UP+2)
#define WIN		(PICK_UP+3)
#define PASS		(PICK_UP+4)
#define BACK_UP		(PICK_UP+5)
#define ANAL_END	(PICK_UP+6)

#define SUIT(x)		((x)%4)
#define VALUE(x)	((x)/4)

#define ROW(player,suit,value)	((player)+(suit))
#define COL(player,suit,value)	(MARGIN+18+(value)*4)

#ifdef EXTERN
#define INIT(x)	=x;
#else
#define EXTERN	extern
#define INIT(x)
#endif

EXTERN int start_player INIT(HUMAN);
EXTERN int depth INIT(4);
EXTERN int size INIT(8);
EXTERN int size2, max_card;

EXTERN char computer[MAX_CARD], human[MAX_CARD], table[MAX_CARD], top;
EXTERN int nr_computer, nr_human, nr_table;

EXTERN long seed;

EXTERN int nasty();

EXTERN int computer_score INIT(0);
EXTERN int human_score INIT(0);
EXTERN char no_scoring INIT(FALSE);
EXTERN char analysing INIT(FALSE);

EXTERN char s_computer[MAX_CARD], s_human[MAX_CARD], moves[2048];
EXTERN unsigned long pick_ups[2048];

EXTERN FILE *logfile INIT(NULL);
EXTERN FILE *old_logfile INIT(NULL);
EXTERN FILE *save_logfile;
EXTERN int nr_moves, move_logged;

#ifdef TIMER
EXTERN int timer();
EXTERN int minutes, seconds;
#endif

EXTERN int demo INIT(0);