1 2 // attack.h 3 4 #ifndef ATTACK_H 5 #define ATTACK_H 6 7 // includes 8 9 #include "board.h" 10 #include "util.h" 11 12 // defines 13 14 #define IncNone 0 15 16 // "constants" 17 18 extern const sint8 KnightInc[8+1]; 19 extern const sint8 BishopInc[4+1]; 20 extern const sint8 RookInc[4+1]; 21 extern const sint8 QueenInc[8+1]; 22 extern const sint8 KingInc[8+1]; 23 24 // functions 25 26 extern void attack_init (); 27 28 extern bool is_in_check (const board_t * board, int colour); 29 extern bool is_attacked (const board_t * board, int to, int colour); 30 extern bool piece_attack (const board_t * board, int piece, int from, int to); 31 32 extern bool is_pinned (const board_t * board, int from, int to, int colour); 33 34 #endif // !defined ATTACK_H 35 36 // end of attack.h 37 38