#include "bitboard.h"
#include "move.h"
-#include "piece.h"
-#include "square.h"
-#include "value.h"
+#include "types.h"
/// Maximum number of plies per game (220 should be enough, because the
/// maximum search depth is 100, and during position setup we reset the
class Position {
- friend class MaterialInfo;
- friend class EndgameFunctions;
-
Position(); // No default or copy c'tor allowed
Position(const Position& pos);
bool is_mate() const;
bool is_draw() const;
- // Check if side to move could be mated in one
- bool has_mate_threat();
-
// Number of plies from starting position
int startpos_ply_counter() const;
int castleRightsMask[64];
StateInfo startState;
File initialKFile, initialKRFile, initialQRFile;
- bool isChess960;
+ bool chess960;
int startPosPlyCounter;
int threadID;
int64_t nodes;
template<>
inline Bitboard Position::attacks_from<PAWN>(Square s, Color c) const {
- return NonSlidingAttacksBB[make_piece(c, PAWN)][s];
+ return StepAttacksBB[make_piece(c, PAWN)][s];
}
template<PieceType Piece> // Knight and King and white pawns
inline Bitboard Position::attacks_from(Square s) const {
- return NonSlidingAttacksBB[Piece][s];
+ return StepAttacksBB[Piece][s];
}
template<>
}
inline bool Position::is_chess960() const {
- return isChess960;
+ return chess960;
}
inline bool Position::move_is_capture(Move m) const {