#ifndef GENH_INCLUDED
#define GENH_INCLUDED

#include "defs.h"

#include <stdio.h> 
#include <stdlib.h> 


#define CAPLAST 7200000
#define CAPBASE 7000000 /* killers (6.1&6 M) */
#define PROBASE 6900000
#define CASBASE 5100000
#define LOSERS  5100000
#define KINGWONDER 0
#define PAWNPUSH 0 
#define PAWNJUMP 0 
#define KNIGHTHOP 0 

/*
  pxk   20002
  pxq   975-0=975  mxq   975-25=950  rxq   975-50=925  qxq   975-75=900  kxq   975-100=875
  pxr   500-0=500  mxr   500-25=475  rxr   500-50=450  qxr   500-75=425  kxr   500-100=400
  pxm   325-0=325  mxm   325-25=300  rxm   325-50=275  qxm   325-75=250  kxm   325-100=225
  pxp   100-0=100  mxp   100-25=75   rxp   100-50=50   qxp   100-75=25   kxp   100-100=0
*/


extern /*const*/ char pst[16][192];
extern const int cval[16];
extern const int dlta[16];
extern const int nval[16];
extern const int mval[16];
extern int board[256];
extern int indx[192];
extern int pieces[2][16];
extern int castle;
extern int epsquare;
extern int ply;
extern int stm;
extern sMOVES move_list[4096];
extern sMOVES * last_move[MAXPLY];
extern unsigned int history[2][64*64];
extern sHISTDATA * mhs;
extern int p_curve[64];
extern int force[2];


int attacked_by_white(int);
int attacked_by_black(int);
int seem(uMOVE * m, int shade);
int ssee(uMOVE *m);
int see(uMOVE * m);
int nsee(int start, int target);
int checkmove(uMOVE * m);
int domove(const uMOVE *);
void unmove();
int inCheck(int c);

int hget(const uMOVE *);

#endif /* GENH_INCLUDED */
