openCheck.h
Go to the documentation of this file.
/* openCheck.h
*/
#ifndef _MOVE_CLASSIFIER_OPENCHECK_H
#define _MOVE_CLASSIFIER_OPENCHECK_H
#include "osl/move_classifier/classifierTraits.h"
#include "osl/move_classifier/kingOpenMove.h"
#include "osl/numEffectState.h"
namespace osl
{
namespace move_classifier
{
template <Player P>
struct OpenCheck
{
static bool isMember(const NumEffectState& state,
Ptype ptype,Square from,Square to)
{
return KingOpenMove<alt(P)>::isMember(state,ptype,from,to);
}
};
template <Player P> struct ClassifierTraits<OpenCheck<P> >
{
static const bool drop_suitable = false;
static const bool result_if_drop = false;
};
} // namespace move_classifier
} // namespace osl
#endif /* _MOVE_CLASSIFIER_OPENCHECK_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
classifierTraits.h
osl::NumEffectState
利きを持つ局面
Definition numEffectState.h:34
osl::Square
Definition basic_type.h:532
kingOpenMove.h
osl::move_classifier
Definition check_.h:10
osl
Definition additionalEffect.h:6
osl::Ptype
Ptype
駒の種類を4ビットでコード化する
Definition basic_type.h:84
osl::alt
constexpr Player alt(Player player)
Definition basic_type.h:13
numEffectState.h
osl::move_classifier::ClassifierTraits< OpenCheck< P > >::result_if_drop
static const bool result_if_drop
Definition openCheck.h:27
osl::move_classifier::ClassifierTraits< OpenCheck< P > >::drop_suitable
static const bool drop_suitable
Definition openCheck.h:26
osl::move_classifier::ClassifierTraits
Definition classifierTraits.h:11
osl::move_classifier::KingOpenMove
Pの王をopen checkにする手でないことをチェック.
Definition kingOpenMove.h:22
osl::move_classifier::OpenCheck
Definition openCheck.h:16
osl::move_classifier::OpenCheck::isMember
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
Definition openCheck.h:17