//// Constants
////
-/// FEN string for the initial position
-const std::string StartPositionFEN = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
-
/// Maximum number of plies per game (220 should be enough, because the
/// maximum search depth is 100, and during position setup we reset the
/// move counter for every non-reversible move).
// Static exchange evaluation
int see(Square from, Square to) const;
int see(Move m) const;
- int see(Square to) const;
int see_sign(Move m) const;
// Accessing hash keys
bool is_mate() const;
bool is_draw() const;
- // Check if one side threatens a mate in one
- bool has_mate_threat(Color c);
+ // Check if side to move could be mated in one
+ bool has_mate_threat();
// Number of plies since the last non-reversible move
int rule_50_counter() const;
// Other properties of the position
bool opposite_colored_bishops() const;
bool has_pawn_on_7th(Color c) const;
+ bool is_chess960() const;
// Current thread ID searching on the position
int thread() const;
int castleRightsMask[64];
StateInfo startState;
File initialKFile, initialKRFile, initialQRFile;
+ bool isChess960;
int startPosPlyCounter;
int threadID;
StateInfo* st;
static Key zobSideToMove;
static Score PieceSquareTable[16][64];
static Key zobExclusion;
+ static const Value seeValues[8];
};
}
inline Value Position::midgame_value_of_piece_on(Square s) const {
- return piece_value_midgame(piece_on(s));
+ return PieceValueMidgame[piece_on(s)];
}
inline Value Position::endgame_value_of_piece_on(Square s) const {
- return piece_value_endgame(piece_on(s));
+ return PieceValueEndgame[piece_on(s)];
}
inline Color Position::side_to_move() const {
return pieces(PAWN, c) & relative_rank_bb(c, RANK_7);
}
+inline bool Position::is_chess960() const {
+
+ return isChess960;
+}
+
inline bool Position::move_is_capture(Move m) const {
// Move must not be MOVE_NONE !