mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Move piece values in piece.h / piece.cpp
Where they belong. Note that array PieceValueMidgame[] and PieceValueEndgame[] are now declared extern in the header and moved in piece.cpp so to avoid allocate the array each time the header is included ! No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -28,6 +28,33 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Tables indexed by Piece
|
||||
|
||||
const Value PieceValueMidgame[17] = {
|
||||
VALUE_ZERO,
|
||||
PawnValueMidgame, KnightValueMidgame, BishopValueMidgame,
|
||||
RookValueMidgame, QueenValueMidgame,
|
||||
VALUE_ZERO, VALUE_ZERO, VALUE_ZERO,
|
||||
PawnValueMidgame, KnightValueMidgame, BishopValueMidgame,
|
||||
RookValueMidgame, QueenValueMidgame,
|
||||
VALUE_ZERO, VALUE_ZERO, VALUE_ZERO
|
||||
};
|
||||
|
||||
const Value PieceValueEndgame[17] = {
|
||||
VALUE_ZERO,
|
||||
PawnValueEndgame, KnightValueEndgame, BishopValueEndgame,
|
||||
RookValueEndgame, QueenValueEndgame,
|
||||
VALUE_ZERO, VALUE_ZERO, VALUE_ZERO,
|
||||
PawnValueEndgame, KnightValueEndgame, BishopValueEndgame,
|
||||
RookValueEndgame, QueenValueEndgame,
|
||||
VALUE_ZERO, VALUE_ZERO, VALUE_ZERO
|
||||
};
|
||||
|
||||
const int SlidingArray[18] = {
|
||||
0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
|
||||
////
|
||||
//// Functions
|
||||
////
|
||||
|
||||
Reference in New Issue
Block a user