My Project
allMoves.h
Go to the documentation of this file.
1 #ifndef OSL_GENERATE_ALL_MOVES_H
2 #define OSL_GENERATE_ALL_MOVES_H
3 #include "osl/numEffectState.h"
5 
6 namespace osl
7 {
8  namespace move_generator
9  {
14  template<class Action>
15  class AllMoves
16  {
17  public:
23  template<Player P>
24  static void generateOnBoard(const NumEffectState& state, Action& action);
25 
31  template<Player P>
32  static void generate(const NumEffectState& state, Action& action);
33 
34  static void generate(Player p, const NumEffectState& state, Action& action)
35  {
36  if(p==BLACK)
37  generate<BLACK>(state,action);
38  else
39  generate<WHITE>(state,action);
40  }
41  };
42 
43  } // namespace move_generator
44 
46  {
47  static void generate(Player p, const NumEffectState& state, MoveVector&);
48  template <Player P>
49  static void generate(const NumEffectState& state, MoveVector& out)
50  {
52  store_t store(out);
54  }
55  template <Player P>
56  static void generateOnBoard(const NumEffectState& state, MoveVector& out)
57  {
59  store_t store(out);
61  }
62  };
63 } // namespace osl
64 
65 #endif /* OSL_GENERATE_ALL_MOVES_H */
66 // ;;; Local Variables:
67 // ;;; mode:c++
68 // ;;; c-basic-offset:2
69 // ;;; End:
osl::move_generator::AllMoves::generate
static void generate(Player p, const NumEffectState &state, Action &action)
Definition: allMoves.h:34
osl::GenerateAllMoves::generate
static void generate(const NumEffectState &state, MoveVector &out)
Definition: allMoves.h:49
osl::move_generator::AllMoves
Move::ignoreUnpromote() でないすべての手を生成
Definition: allMoves.h:16
osl::move_generator::AllMoves::generateOnBoard
static void generateOnBoard(const NumEffectState &state, Action &action)
osl::move_generator::store_t
move_action::Store store_t
Definition: addEffectWithEffect.cc:11
osl::move_generator::AllMoves::generate
static void generate(const NumEffectState &state, Action &action)
osl::move_action::Store
指手を MoveVector に保管
Definition: move_action.h:16
osl::GenerateAllMoves::generate
static void generate(Player p, const NumEffectState &state, MoveVector &)
Definition: allMoves.cc:15
osl::NumEffectState
利きを持つ局面
Definition: numEffectState.h:34
osl::GenerateAllMoves::generateOnBoard
static void generateOnBoard(const NumEffectState &state, MoveVector &out)
Definition: allMoves.h:56
osl::BLACK
@ BLACK
Definition: basic_type.h:9
osl::MoveVector
Definition: container.h:293
osl::Player
Player
Definition: basic_type.h:8
numEffectState.h
move_action.h
osl
Definition: additionalEffect.h:6
osl::GenerateAllMoves
Definition: allMoves.h:46