My Project
check_.h
Go to the documentation of this file.
1/* check_.h
2 */
3#ifndef OSL_MOVE_CLASSIFIER_CHECK_H
4#define OSL_MOVE_CLASSIFIER_CHECK_H
7namespace osl
8{
9 namespace move_classifier
10 {
14 template <Player P>
15 struct Check
16 {
20 static bool isMember(const NumEffectState& state,
21 Ptype ptype,Square from,Square to){
22 if (DirectCheck<P>::isMember(state,ptype,to))
23 return true;
24 if (from.isPieceStand())
25 return false;
26 return OpenCheck<P>::isMember(state,ptype,from,to);
27 }
28 };
29 } // namespace move_classifier
30} // namespace osl
31#endif /* _MOVE_CLASSIFIER_CHECK_H */
32// ;;; Local Variables:
33// ;;; mode:c++
34// ;;; c-basic-offset:2
35// ;;; End:
利きを持つ局面
bool isPieceStand() const
Definition basic_type.h:576
Ptype
駒の種類を4ビットでコード化する
Definition basic_type.h:84
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
promote move の時 ptypeはpromote後のもの
Definition check_.h:20
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
Definition openCheck.h:17