X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=91604e94a81d12f1068c3db6b7a62e54f30fd8f3;hp=3da25b6f57e4c6e54b8e62af18c84e9717d385ee;hb=95212222c7444538b84326208e433ac12f15e9fb;hpb=324ca87affc4959f7017e83437fb06b6e770449c diff --git a/src/position.h b/src/position.h index 3da25b6f..91604e94 100644 --- a/src/position.h +++ b/src/position.h @@ -21,7 +21,6 @@ #define POSITION_H_INCLUDED #include "bitboard.h" -#include "color.h" #include "move.h" #include "piece.h" #include "square.h" @@ -434,7 +433,7 @@ inline Square Position::initial_qr_square(Color c) const { template<> inline Bitboard Position::attacks_from(Square s, Color c) const { - return NonSlidingAttacksBB[piece_of_color_and_type(c, PAWN)][s]; + return NonSlidingAttacksBB[make_piece(c, PAWN)][s]; } template // Knight and King and white pawns @@ -490,7 +489,7 @@ inline Key Position::get_material_key() const { } inline Score Position::pst(Color c, PieceType pt, Square s) { - return PieceSquareTable[piece_of_color_and_type(c, pt)][s]; + return PieceSquareTable[make_piece(c, pt)][s]; } inline Score Position::pst_delta(Piece piece, Square from, Square to) { @@ -508,7 +507,7 @@ inline Value Position::non_pawn_material(Color c) const { inline bool Position::move_is_passed_pawn_push(Move m) const { Color c = side_to_move(); - return piece_on(move_from(m)) == piece_of_color_and_type(c, PAWN) + return piece_on(move_from(m)) == make_piece(c, PAWN) && pawn_is_passed(c, move_to(m)); }