- bitboard.c: make attacks for knight/king - square macros (BB, BBfile, BBrank) renamed sq_make, sq_file, sq_rank, moved to board.h (and become temporarily inline funcs) - different macros/defs moved to "correct place" (bitboard/board/piece): board.[ch]: everything related to board/square bitboard.[ch]: everything related to bitboards piece.[ch]: everything related to pieces
24 lines
601 B
C
24 lines
601 B
C
//#include "debug.h"
|
|
//#include "pool.h"
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "../src/bitboard.h"
|
|
#include "../src/position.h"
|
|
#include "../src/piece.h"
|
|
//#include "../src/fen.h"
|
|
|
|
int main(int __unused ac, __unused char**av)
|
|
{
|
|
char str[128];
|
|
bitboard_init();
|
|
for (square_t sq = 0; sq < 64; ++sq) {
|
|
sprintf(str, "%2d %#lx %#lx knight", sq, sq_bb[sq], knight_attacks[sq]);
|
|
bitboard_print(knight_attacks[sq], str);
|
|
sprintf(str, "%2d %#lx %#lx knight", sq, sq_bb[sq], king_attacks[sq]);
|
|
bitboard_print(king_attacks[sq], str);
|
|
}
|
|
return 0;
|
|
}
|