mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Implemented the logic to update Eval List and Dirty Pieces.
This commit is contained in:
+8
-3
@@ -469,7 +469,7 @@ constexpr bool is_ok(Move m) {
|
||||
// --------------------
|
||||
|
||||
// Positionクラスで用いる、駒リスト(どの駒がどこにあるのか)を管理するときの番号。
|
||||
enum PieceNumber : int8_t
|
||||
enum PieceNumber : uint8_t
|
||||
{
|
||||
PIECE_NUMBER_PAWN = 0,
|
||||
PIECE_NUMBER_KNIGHT = 16,
|
||||
@@ -483,8 +483,13 @@ enum PieceNumber : int8_t
|
||||
PIECE_NUMBER_NB = 32,
|
||||
};
|
||||
|
||||
inline PieceNumber& operator++(PieceNumber& d) { return d = PieceNumber(int(d) + 1); } \
|
||||
inline PieceNumber& operator--(PieceNumber& d) { return d = PieceNumber(int(d) - 1); }
|
||||
inline PieceNumber& operator++(PieceNumber& d) { return d = PieceNumber(int8_t(d) + 1); }
|
||||
inline PieceNumber operator++(PieceNumber& d, int) {
|
||||
PieceNumber x = d;
|
||||
d = PieceNumber(int8_t(d) + 1);
|
||||
return x;
|
||||
}
|
||||
inline PieceNumber& operator--(PieceNumber& d) { return d = PieceNumber(int8_t(d) - 1); }
|
||||
|
||||
// PieceNumberの整合性の検査。assert用。
|
||||
constexpr bool is_ok(PieceNumber pn) { return pn < PIECE_NUMBER_NB; }
|
||||
|
||||
Reference in New Issue
Block a user