説明を見る。00001
00002
00003 #ifndef OSL_MOVE_CLASSIFIER_DIRECTCHECK_H
00004 #define OSL_MOVE_CLASSIFIER_DIRECTCHECK_H
00005
00006 #include "osl/basic_type.h"
00007
00008 namespace osl
00009 {
00010 namespace move_classifier
00011 {
00012 template <Player P>
00013 struct DirectCheck
00014 {
00015 static bool isMember(const NumEffectState& state, Ptype ptype, Square to)
00016 {
00020 assert(!state.template hasEffectAt<P>(state.template kingSquare<alt(P)>()));
00027 return state.hasEffectIf(newPtypeO(P,ptype),to,
00028 state.template kingSquare<alt(P)>());
00029 }
00030
00031 template<class State>
00032 static bool isMember(const State& state, Ptype ptype, Square , Square to)
00033 {
00034 return isMember(state, ptype, to);
00035 }
00036 };
00037 }
00038 }
00039
00040 #endif
00041
00042
00043
00044