All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
attackDefenceAroundKing.h
Go to the documentation of this file.
1 /* attackDefenceAroundKing.h
2  */
3 #ifndef _ATTACK_DEFENCE_AROUND_KING_MC_H
4 #define _ATTACK_DEFENCE_AROUND_KING_MC_H
5 
8 #include "osl/direction.h"
9 
10 namespace osl
11 {
12  namespace move_classifier
13  {
22  template <Player P>
24  {
25  static bool
26  isMember(const NumEffectState& state, Move move)
27  {
28  const PtypeO ptypeO = move.ptypeO();
29  Square from = move.to();
30  Square king = state.template kingSquare <P> ();
31 
32  return Neighboring25Direct::hasEffect(state, ptypeO, from, king);
33  }
34  };
35  } // namespace move_classifier
36 
37 } // namespace osl
38 
39 #endif /* _ATTACK_DEFENCE_AROUND_KING_MC_H */
40 // ;;; Local Variables:
41 // ;;; mode:c++
42 // ;;; c-basic-offset:2
43 // ;;; End: