mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Templetize functions to get pieces by type
Use a single template to get bitboard representation of the position given the type of piece as a constant. This removes almost 80 lines of code and introduces an uniform notation to be used for querying for piece type. No functional change and no performance change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+2
-1
@@ -35,7 +35,8 @@
|
||||
|
||||
enum PieceType {
|
||||
NO_PIECE_TYPE = 0,
|
||||
PAWN = 1, KNIGHT = 2, BISHOP = 3, ROOK = 4, QUEEN = 5, KING = 6
|
||||
PAWN = 1, KNIGHT = 2, BISHOP = 3, ROOK = 4, QUEEN = 5, KING = 6,
|
||||
BISHOP_AND_QUEEN = 8, ROOK_AND_QUEEN = 9
|
||||
};
|
||||
|
||||
enum Piece {
|
||||
|
||||
Reference in New Issue
Block a user