Update .clang-format

This commit is contained in:
Ole Morud
2023-03-26 19:15:46 +02:00
committed by Ole Morud
parent 863328a3de
commit 319428e1bc
15 changed files with 1256 additions and 750 deletions

60
testing/test_threatmap.c Normal file
View File

@@ -0,0 +1,60 @@
#include "threatmap.h"
// uint64_t pawn_threatmap(const tile_t board[BOARD_SIZE], index_t index);
// uint64_t bishop_threatmap(const tile_t board[BOARD_SIZE], index_t index);
// uint64_t rook_threatmap(const tile_t board[BOARD_SIZE], index_t index);
// uint64_t knight_threatmap(index_t index);
// uint64_t king_threatmap(const tile_t board[BOARD_SIZE], index_t index);
// uint64_t queen_threatmap(const tile_t board[BOARD_SIZE], index_t index);
// uint64_t threatmap(const tile_t board[BOARD_SIZE], int color_attacking);
// void print_threatmap(uint64_t threatmap);
void test_threatmap()
{
const tile_t e4[] = {
-R, -N, -B, -Q, -K, -B, -N, -R,
-P, -P, -P, -P, -P, -P, -P, -P,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, P, E, E, E, E,
E, E, E, E, E, E, E, E,
P, P, P, E, P, P, P, P,
R, N, B, Q, K, B, N, R
};
const tile_t lonely_bishop[] = {
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, B, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
};
const tile_t lonely_rook[] = {
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, R, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
E, E, E, E, E, E, E, E,
};
(void)lonely_rook; (void)lonely_bishop; (void)e4;
//print_threatmap(threatmap(e4, WHITE));
print_threatmap(threatmap(lonely_bishop, WHITE));
//print_threatmap(threatmap(lonely_rook, WHITE));
}
int main()
{
test_threatmap();
return 0;
}