mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Remove Rank
This commit is contained in:
parent
32ff92de2f
commit
18d2ca5055
2 changed files with 0 additions and 11 deletions
|
@ -1,9 +1,7 @@
|
||||||
#include "bitboard.h"
|
#include "bitboard.h"
|
||||||
|
|
||||||
Bitboard FileBB[FILE_NB];
|
Bitboard FileBB[FILE_NB];
|
||||||
Bitboard RankBB[RANK_NB];
|
|
||||||
Bitboard AdjacentFilesBB[FILE_NB];
|
Bitboard AdjacentFilesBB[FILE_NB];
|
||||||
Bitboard InFrontBB[COLOR_NB][RANK_NB];
|
|
||||||
Bitboard PawnAttackSpan[COLOR_NB][SQUARE_NB];
|
Bitboard PawnAttackSpan[COLOR_NB][SQUARE_NB];
|
||||||
|
|
||||||
/// Bitboards::init() initializes various bitboard tables. It is called at
|
/// Bitboards::init() initializes various bitboard tables. It is called at
|
||||||
|
|
|
@ -27,10 +27,6 @@ enum File {
|
||||||
FILE_A, FILE_B, FILE_C, FILE_D, FILE_E, FILE_F, FILE_G, FILE_H, FILE_NB
|
FILE_A, FILE_B, FILE_C, FILE_D, FILE_E, FILE_F, FILE_G, FILE_H, FILE_NB
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Rank {
|
|
||||||
RANK_1, RANK_2, RANK_3, RANK_4, RANK_5, RANK_6, RANK_7, RANK_8, RANK_NB
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ENABLE_BASE_OPERATORS_ON(T) \
|
#define ENABLE_BASE_OPERATORS_ON(T) \
|
||||||
inline T operator+(T d1, T d2) { return T(int(d1) + int(d2)); } \
|
inline T operator+(T d1, T d2) { return T(int(d1) + int(d2)); } \
|
||||||
inline T operator-(T d1, T d2) { return T(int(d1) - int(d2)); } \
|
inline T operator-(T d1, T d2) { return T(int(d1) - int(d2)); } \
|
||||||
|
@ -52,16 +48,11 @@ inline T& operator/=(T& d, int i) { return d = T(int(d) / i); }
|
||||||
ENABLE_FULL_OPERATORS_ON(Color)
|
ENABLE_FULL_OPERATORS_ON(Color)
|
||||||
ENABLE_FULL_OPERATORS_ON(Square)
|
ENABLE_FULL_OPERATORS_ON(Square)
|
||||||
ENABLE_FULL_OPERATORS_ON(File)
|
ENABLE_FULL_OPERATORS_ON(File)
|
||||||
ENABLE_FULL_OPERATORS_ON(Rank)
|
|
||||||
|
|
||||||
inline File file_of(Square s) {
|
inline File file_of(Square s) {
|
||||||
return File(s & 7);
|
return File(s & 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Rank rank_of(Square s) {
|
|
||||||
return Rank(s >> 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Bitboards { void init(); }
|
namespace Bitboards { void init(); }
|
||||||
|
|
||||||
const Bitboard FileABB = 0x0101010101010101ULL;
|
const Bitboard FileABB = 0x0101010101010101ULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue