/usr/include/osl/rating/feature/checkmate.h is in libosl-dev 0.6.0-3.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | /* checkmate.h
*/
#ifndef _CHECKMATE_H
#define _CHECKMATE_H
#include "osl/rating/feature.h"
#include "osl/checkmate/immediateCheckmate.h"
#include "osl/checkmate/checkmateIfCapture.h"
namespace osl
{
namespace rating
{
class CheckmateIfCapture : public Feature
{
public:
CheckmateIfCapture() : Feature("CC") {}
bool match(const NumEffectState& state, Move move, const RatingEnv&) const
{
return state.hasEffectAt(alt(move.player()), move.to())
&& checkmate::CheckmateIfCapture::effectiveAttackCandidate0(state, move)
&& checkmate::CheckmateIfCapture::effectiveAttack
(const_cast<NumEffectState&>(state), move, 0); // XXX: evil cast
}
};
class Threatmate : public Feature
{
public:
Threatmate() : Feature("Tm") {}
bool match(const NumEffectState& state, Move move, const RatingEnv&) const;
struct Helper;
static bool isCandidate(const NumEffectState& state, Move move);
static bool knight2Step(const NumEffectState& state, Move move, Square king);
static bool captureForKnightCheck(const NumEffectState& state, Move move, Square king);
};
}
}
#endif /* _CHECKMATE_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|