mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Use enums instead of constants for piece values
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
0c6ed5929c
commit
e8b7109eff
1 changed files with 12 additions and 12 deletions
24
src/types.h
24
src/types.h
|
@ -166,7 +166,18 @@ enum Value {
|
||||||
VALUE_MATED_IN_MAX_PLY = -VALUE_MATE + MAX_PLY,
|
VALUE_MATED_IN_MAX_PLY = -VALUE_MATE + MAX_PLY,
|
||||||
|
|
||||||
VALUE_ENSURE_INTEGER_SIZE_P = INT_MAX,
|
VALUE_ENSURE_INTEGER_SIZE_P = INT_MAX,
|
||||||
VALUE_ENSURE_INTEGER_SIZE_N = INT_MIN
|
VALUE_ENSURE_INTEGER_SIZE_N = INT_MIN,
|
||||||
|
|
||||||
|
PawnValueMidgame = 198,
|
||||||
|
PawnValueEndgame = 258,
|
||||||
|
KnightValueMidgame = 817,
|
||||||
|
KnightValueEndgame = 846,
|
||||||
|
BishopValueMidgame = 836,
|
||||||
|
BishopValueEndgame = 857,
|
||||||
|
RookValueMidgame = 1270,
|
||||||
|
RookValueEndgame = 1278,
|
||||||
|
QueenValueMidgame = 2521,
|
||||||
|
QueenValueEndgame = 2558
|
||||||
};
|
};
|
||||||
|
|
||||||
enum PieceType {
|
enum PieceType {
|
||||||
|
@ -310,17 +321,6 @@ inline Score apply_weight(Score v, Score w) {
|
||||||
#undef ENABLE_OPERATORS_ON
|
#undef ENABLE_OPERATORS_ON
|
||||||
#undef ENABLE_SAFE_OPERATORS_ON
|
#undef ENABLE_SAFE_OPERATORS_ON
|
||||||
|
|
||||||
const Value PawnValueMidgame = Value(198);
|
|
||||||
const Value PawnValueEndgame = Value(258);
|
|
||||||
const Value KnightValueMidgame = Value(817);
|
|
||||||
const Value KnightValueEndgame = Value(846);
|
|
||||||
const Value BishopValueMidgame = Value(836);
|
|
||||||
const Value BishopValueEndgame = Value(857);
|
|
||||||
const Value RookValueMidgame = Value(1270);
|
|
||||||
const Value RookValueEndgame = Value(1278);
|
|
||||||
const Value QueenValueMidgame = Value(2521);
|
|
||||||
const Value QueenValueEndgame = Value(2558);
|
|
||||||
|
|
||||||
extern const Value PieceValueMidgame[17]; // Indexed by Piece or PieceType
|
extern const Value PieceValueMidgame[17]; // Indexed by Piece or PieceType
|
||||||
extern const Value PieceValueEndgame[17];
|
extern const Value PieceValueEndgame[17];
|
||||||
extern int SquareDistance[64][64];
|
extern int SquareDistance[64][64];
|
||||||
|
|
Loading…
Add table
Reference in a new issue