00001 /* check_.h 00002 */ 00003 #ifndef _MOVE_CLASSIFIER_CHECK_H 00004 #define _MOVE_CLASSIFIER_CHECK_H 00005 #include "osl/move_classifier/openCheck.h" 00006 #include "osl/move_classifier/directCheck.h" 00007 namespace osl 00008 { 00009 namespace move_classifier 00010 { 00014 template <Player P> 00015 struct Check 00016 { 00020 template<class State> 00021 static bool isMember(const State& state, 00022 Ptype ptype,Position from,Position to){ 00023 if (DirectCheck<P>::isMember(state,ptype,to)) 00024 return true; 00025 if (from.isPieceStand()) 00026 return false; 00027 return OpenCheck<P>::isMember(state,ptype,from,to); 00028 } 00029 }; 00030 } // namespace move_classifier 00031 } // namespace osl 00032 #endif /* _MOVE_CLASSIFIER_CHECK_H */ 00033 // ;;; Local Variables: 00034 // ;;; mode:c++ 00035 // ;;; c-basic-offset:2 00036 // ;;; End: