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
7 namespace 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:
osl::Square
Definition: basic_type.h:532
osl::move_classifier::Check
Definition: check_.h:16
directCheck.h
osl::Ptype
Ptype
駒の種類を4ビットでコード化する
Definition: basic_type.h:84
osl::move_classifier::OpenCheck::isMember
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
Definition: openCheck.h:17
openCheck.h
osl::Square::isPieceStand
bool isPieceStand() const
Definition: basic_type.h:576
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::NumEffectState
利きを持つ局面
Definition: numEffectState.h:34
osl::move_classifier::DirectCheck
Definition: directCheck.h:14
osl
Definition: additionalEffect.h:6