X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=5a80402d94c2d1838cc5d84ad9d169695e28618c;hp=5002ece8c8dd202bd0fcf7a12bbd1c35d6f38368;hb=f12449d492f75a83f9cd3a24cdb461bc3595536f;hpb=1d1b7df7c6b3496d1a3fe926cadf25d91e1558f6 diff --git a/src/types.h b/src/types.h index 5002ece8..5a80402d 100644 --- a/src/types.h +++ b/src/types.h @@ -322,11 +322,11 @@ extern Value PieceValue[PHASE_NB][PIECE_NB]; struct ExtMove { Move move; - int score; + Value value; }; inline bool operator<(const ExtMove& f, const ExtMove& s) { - return f.score < s.score; + return f.value < s.value; } inline Color operator~(Color c) { @@ -337,10 +337,6 @@ inline Square operator~(Square s) { return Square(s ^ SQ_A8); // Vertical flip SQ_A1 -> SQ_A8 } -inline Square operator|(File f, Rank r) { - return Square((r << 3) | f); -} - inline CastlingRight operator|(Color c, CastlingSide s) { return CastlingRight(WHITE_OO << ((s == QUEEN_SIDE) + 2 * c)); } @@ -353,6 +349,10 @@ inline Value mated_in(int ply) { return -VALUE_MATE + ply; } +inline Square make_square(File f, Rank r) { + return Square((r << 3) | f); +} + inline Piece make_piece(Color c, PieceType pt) { return Piece((c << 3) | pt); }