promote_.h
Go to the documentation of this file.
1 #ifndef OSL_MOVE_GENERATOR_PROMOTE_H
2 #define OSL_MOVE_GENERATOR_PROMOTE_H
4 #include "osl/numEffectState.h"
5 
6 namespace osl
7 {
8  namespace move_generator
9  {
16  template<Player P,bool NoCapture=true>
17  class Promote
18  {
19  public:
20  template<class Action, Ptype T>
21  static void generateMovesPtype(const NumEffectState& state, Action& action);
22  template<Ptype T>
23  static void generatePtype(const NumEffectState& state, MoveVector& out)
24  {
25  move_action::Store store(out);
26  generateMovesPtype<move_action::Store,T>(state, store);
27  }
28  template<class Action>
29  static void generateMoves(const NumEffectState& state, Action& action);
30 
31  static void generate(const NumEffectState& state, MoveVector& out)
32  {
33  move_action::Store store(out);
34  generateMoves(state, store);
35  }
36  };
37 
41  template<bool NoCapture>
43  {
44  template<class Action>
45  static void generate(Player p, const NumEffectState& state, Action& action)
46  {
47  if (p == BLACK)
49  else
51  }
52  };
53  }
54 }
55 #endif /* OSL_MOVE_GENERATOR_PROMOTE_H */
56 // ;;; Local Variables:
57 // ;;; mode:c++
58 // ;;; c-basic-offset:2
59 // ;;; End:
static void generateMovesPtype(const NumEffectState &state, Action &action)
Player で特殊化した Action でinstantiate すると無駄なので注意.
Definition: promote_.h:42
成る手を生成.
Definition: promote_.h:17
指手を MoveVector に保管
Definition: move_action.h:15
static void generateMoves(const NumEffectState &state, Action &action)
static void generate(Player p, const NumEffectState &state, Action &action)
Definition: promote_.h:45
利きを持つ局面
static void generatePtype(const NumEffectState &state, MoveVector &out)
Definition: promote_.h:23
Player
Definition: basic_type.h:8
static void generate(const NumEffectState &state, MoveVector &out)
Definition: promote_.h:31