All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
addEffect8Defense.h
Go to the documentation of this file.
1 #ifndef _GENERATE_ADD_EFFECT8_DEFENSE_H
2 #define _GENERATE_ADD_EFFECT8_DEFENSE_H
6 #include "osl/centering3x3.h"
8 
9 namespace osl
10 {
11  namespace move_generator
12  {
18  template <Player P>
20  {
21  static void generateTo(const NumEffectState& state,
22  Square p,
23  move_action::Store& action)
24  {
25  if (!p.isOnBoard()) return;
26  GenerateAddEffectWithEffect::generate<false>(P, state, p, action);
27  }
28 
29  static void generate(const NumEffectState& state, MoveVector& moves)
30  {
31  const Square king = state.template kingSquare<P>();
33  {
34  move_action::Store action(moves);
35  generateTo(state, center, action);
36  generateTo(state,
38  action);
39  generateTo(state,
41  action);
42  generateTo(state,
44  action);
45  generateTo(state,
47  action);
48  generateTo(state,
50  action);
51  generateTo(state,
53  action);
54  generateTo(state,
56  action);
57  generateTo(state,
59  action);
60  }
61  moves.unique();
62  }
63  };
64  }
65 } // namespace osl
66 
67 #endif /* _GENERATE_ADD_EFFECT8_DEFENSE_H */
68 // ;;; Local Variables:
69 // ;;; mode:c++
70 // ;;; c-basic-offset:2
71 // ;;; End: