void init_arrays() { init_distance(); clear_history(); mvv_lva_init(); zobrist_init(); }
/* * Initialize Board struct. * * No error checks here, just zero the values. */ void sq0x88_board_init(Board * board) { int i; for (i = 0; i < 128; i++) { board->pieces[i] = NOPIECE; board->colors[i] = NOCOLOR; } board->turn = WHITE; board->castle = NOCASTLE; board->ep_square = NOSQUARE; board->king_square[WHITE] = NOSQUARE; board->king_square[BLACK] = NOSQUARE; board->material[0] = 0; board->material[1] = 0; board->ply_count = 0; board->ply_total = 0; for (i = 0; i < 6; i++) { board->piece_count[WHITE][i] = 0; board->piece_count[BLACK][i] = 0; } board->zhash_key = 0; /* Initiate other structures */ fl_init(&board->zhash_stack, freeKey); fl_init(&board->player_moves, freeMove); l_init(&board->player_pieces, freePiece); vectors_init(board); evalues_init(board); zobrist_init(&board->zob_container); return; }