💾 Archived View for runjimmyrunrunyoufuckerrun.com › src › games › chessengines › tscp › protos.h captured on 2021-12-17 at 13:26:06.

View Raw

More Information

-=-=-=-=-=-=-

/*
 *	PROTOS.H
 *	Tom Kerrigan's Simple Chess Program (TSCP)
 *
 *	Copyright 1997 Tom Kerrigan
 */


/* prototypes */

/* board.c */
void init_board(void);
void init_hash(void);
int hash_rand(void);
void set_hash(void);
BOOL in_check(int s);
BOOL attack(int sq, int s);
void gen(void);
void gen_caps(void);
void gen_push(int from, int to, int bits);
void gen_promote(int from, int to, int bits);
BOOL makemove(move_bytes m);
void takeback(void);

/* book.c */
void open_book(void);
void close_book(void);
int book_move(void);
BOOL book_match(char *s1, char *s2);

/* search.c */
void think(int output);
int search(int alpha, int beta, int depth);
int quiesce(int alpha, int beta);
int reps(void);
void sort_pv(void);
void sort(int from);
void checkup(void);

/* eval.c */
int eval(void);
int eval_light_pawn(int sq);
int eval_dark_pawn(int sq);
int eval_light_king(int sq);
int eval_lkp(int f);
int eval_dark_king(int sq);
int eval_dkp(int f);

/* main.c */
int get_ms(void);
int main(int, char**);
int parse_move(char *s);
char *move_str(move_bytes m);
void print_board(void);
void xboard(void);
void print_result(void);
void bench(void);