check_.h
Go to the documentation of this file.
00001 /* check_.h
00002  */
00003 #ifndef OSL_MOVE_CLASSIFIER_CHECK_H
00004 #define OSL_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       static bool isMember(const NumEffectState& state, 
00021                            Ptype ptype,Square from,Square to){
00022         if (DirectCheck<P>::isMember(state,ptype,to)) 
00023           return true;
00024         if (from.isPieceStand()) 
00025           return false;
00026         return OpenCheck<P>::isMember(state,ptype,from,to);
00027       }
00028     };
00029   } // namespace move_classifier
00030 } // namespace osl
00031 #endif /* _MOVE_CLASSIFIER_CHECK_H */
00032 // ;;; Local Variables:
00033 // ;;; mode:c++
00034 // ;;; c-basic-offset:2
00035 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines