Occupancy & square control bitboards + continue printf->logX

This commit is contained in:
2021-11-08 08:38:38 +01:00
parent c7faa88bfa
commit d38e2f4543
13 changed files with 184 additions and 89 deletions

View File

@@ -34,6 +34,15 @@ typedef struct board_s {
#define SQ88_NOK(s) ((s) & 0x88) /* invalid square */
#define SQ88_OK(s) (!SQ88_NOK(s))
/* definitions for bitboard representation
*/
#define BB(f, r) (8 * (r) + (f)) /* from rank,file to bitboard */
#define FILEBB(b) ((b) % 8) /* from sq88 to file */
#define RANKBB(b) ((b) / 8) /* from sq88 to rank */
#define SQ88_NOK(s) ((s) & 0x88) /* invalid square */
#define SQ88_OK(s) (!SQ88_NOK(s))
/* piece human notation
*/
#define CHAR_EMPTY ' '