All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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: