new pos/bb funcs, legal(), better castling gen, etc. [see commit details]
- new sq_pinners - new pseudo_is_legal() (unfinished) - improve castling pseudo move gen - more position and lower level bitboard helper funcs: - pos_{_occ,between_occ,between_count,pinners} - bb_{rank,file,rel_rank,_sq_aligned,_sq_between) - rename some bitboard globals - replace bb ranks/files enums with defines (issue with clang) -> Need to find a way to use enum safely - tests: - add common-test.h - new attack-test.c
This commit is contained in:
@@ -20,6 +20,13 @@
|
||||
#include "piece.h"
|
||||
#include "bitboard.h"
|
||||
|
||||
/* from human to machine */
|
||||
#define C2FILE(c) (tolower(c) - 'a')
|
||||
#define C2RANK(c) (tolower(c) - '1')
|
||||
/* from machine to human */
|
||||
#define FILE2C(f) ((f) + 'a')
|
||||
#define RANK2C(r) ((r) + '1')
|
||||
|
||||
/* a square is defined as
|
||||
* rrrfff
|
||||
*/
|
||||
|
Reference in New Issue
Block a user