check_.h
Go to the documentation of this file.
/* check_.h
*/
#ifndef OSL_MOVE_CLASSIFIER_CHECK_H
#define OSL_MOVE_CLASSIFIER_CHECK_H
#include "osl/move_classifier/openCheck.h"
#include "osl/move_classifier/directCheck.h"
namespace osl
{
namespace move_classifier
{
template <Player P>
struct Check
{
static bool isMember(const NumEffectState& state,
Ptype ptype,Square from,Square to){
if (DirectCheck<P>::isMember(state,ptype,to))
return true;
if (from.isPieceStand())
return false;
return OpenCheck<P>::isMember(state,ptype,from,to);
}
};
} // namespace move_classifier
} // namespace osl
#endif /* _MOVE_CLASSIFIER_CHECK_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
osl::NumEffectState
利きを持つ局面
Definition numEffectState.h:34
osl::Square
Definition basic_type.h:532
osl::Square::isPieceStand
bool isPieceStand() const
Definition basic_type.h:576
directCheck.h
osl::move_classifier
Definition check_.h:10
osl
Definition additionalEffect.h:6
osl::Ptype
Ptype
駒の種類を4ビットでコード化する
Definition basic_type.h:84
openCheck.h
osl::move_classifier::Check
Definition check_.h:16
osl::move_classifier::Check::isMember
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
promote move の時 ptypeはpromote後のもの
Definition check_.h:20
osl::move_classifier::DirectCheck::isMember
static bool isMember(const NumEffectState &state, Ptype ptype, Square to)
Definition directCheck.h:15
osl::move_classifier::OpenCheck::isMember
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
Definition openCheck.h:17