/* attack.h - attack functions. * * Copyright (C) 2024 Bruno Raoult ("br") * Licensed under the GNU General Public License v3.0 or later. * Some rights reserved. See COPYING. * * You should have received a copy of the GNU General Public License along with this * program. If not, see . * * SPDX-License-Identifier: GPL-3.0-or-later * */ #ifndef _ATTACK_H #define _ATTACK_H #include "chessdefs.h" #include "bitboard.h" bool sq_is_attacked(const pos_t *pos, const bitboard_t occ, const square_t sq, const color_t c); bool is_in_check(const pos_t *pos, const color_t color); bitboard_t sq_attackers(const pos_t *pos, const bitboard_t occ, const square_t sq, const color_t c); bitboard_t sq_attackers_all(const pos_t *pos, const square_t sq); bitboard_t sq_pinners(const pos_t *pos, const square_t sq, const color_t c); #endif