not working: check

This commit is contained in:
2024-03-17 22:04:13 +01:00
parent 2e813e5744
commit 1b779b7667
10 changed files with 198 additions and 83 deletions

View File

10
include/chess/magic.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef CHESS_MAGIC_H
#define CHESS_MAGIC_H
#include <stdint.h>
#include <chess/types.h>
uint_least64_t slidingMovementMask(const uint_least8_t *direction, uint_least8_t directionLength,
uint_least8_t field, uint_least64_t blockMask);
uint_least64_t* getMagicAttackPtr(const uint_least64_t mask, const struct magic_t magic);
#endif

View File

@ -5,7 +5,7 @@
#include <stdint.h>
#define BOARD_SIZE 8
#define TOTAL_BOARD_SIZE BOARD_SIZE * BOARD_SIZE
#define TOTAL_BOARD_SIZE (BOARD_SIZE * BOARD_SIZE)
#define LENGTH(array) (sizeof array / sizeof *array)
#define NOT_SELECTED UINT_LEAST8_MAX