/*
 * Copyright 1996 by Michel D. Grimminck
 *
 * All Rights Reserved
 *
 * Permission to use, copy, modify, and distribute this software and its
 * documentation for any purpose and without fee is hereby granted,
 * provided that the above copyright notice appear in all copies and that
 * both that copyright notice and this permission notice appear in
 * supporting documentation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */
/* global variables */

#include "const.h"
/*#define POS extern
#include "var.c"
#ifdef notdef*/
extern int lmap[10][10];
extern char next[2][93][4];
extern BTYPE board[93],blocked[93];
extern int pieces[8];
extern char promote[2][93];
extern char movelist[MAXPLY][MAXNM][MOVEL];
extern char killer[MAXPLY][MOVEL];
extern struct _movescore {
    char move[MOVEL];
    int value;
    } movescore[MAXNM];
extern int tomove;
extern struct _tpat
{
  char board[50];
  int use_succes;
  int use_fail;
  int nmoves;
  char movelist[12][32];
} tpat[NPAT];

extern int nsort,neval,ngen,ndat,nmat,nmovelist,nquiet,nquietfail,precount,dbfail,pat_try,pat_found,pat_succes;
extern char PV[MPV][MPV][MOVEL];
extern int deval[MAXPLY];
extern int quiescence;
extern int do_order;
extern int do_res,maxpv;
extern unsigned char *database[4096];
extern int db_usage[4096];
extern int use_db;
extern struct _hashentry {
    unsigned int hashkey;
    int min_score;
    int max_score;
    unsigned char board[18];
    char flags;
    char move[2];
    short int depth;
    } transpos[NHASH];
extern struct _evalcache {
    unsigned int hashkey;
    unsigned char board[18];
    int score;
  } evalcache[MAXEVAL];
extern int tablesize;
extern int use_hash;
extern int inhash,outhash,ineval,outeval;
extern int hash_rnd[50][6];
extern int eval_type;
extern int pattern_use[49];
extern int default_search;
extern int default_eval,stage;
extern unsigned int history[20][150][20];
extern int invmap[128];
extern int map[50],reverse_map[50],reverse_color[16];
extern int kill_method;
extern double test_nr,test_e,test_e2;
extern double test_t,test_t2;
extern int parameters[100],param_a[100],param_b[100],param_c[100];
extern char pdnfile[100],dcpfile[100];
extern int search_min,search_max;
extern float perc;
extern char ref_board[MAXREF][50];
extern char ref_move[MAXREF][MOVEL];
extern int ref_nr;
extern struct _game_history {
    unsigned char board[25];
    char move[MOVEL];
    char comment[MAXCOMMENT];
} game_history[200];
extern struct _pdn_info {
    char whitepl[100];
    char blackpl[100];
    char event[100];
    char date[100];
    char site[100];
    char result[100];
} pdn_info;
extern int progress[50];
extern char workdir[256],version[128];
extern int game_history_nr;
extern int selective,predeepning;
extern int usexv;
extern int usecol;
extern float time_left[2];
extern float time_incr;
extern int timecontrolply;
extern float time_reserve;
extern float operator_time;














