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
5
6namespace osl
7{
8 namespace move_generator
9 {
14 template<class Action>
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 {
51 typedef move_action::Store store_t;
52 store_t store(out);
54 }
55 template <Player P>
56 static void generateOnBoard(const NumEffectState& state, MoveVector& out)
57 {
58 typedef move_action::Store store_t;
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:
利きを持つ局面
Move::ignoreUnpromote() でないすべての手を生成
Definition allMoves.h:16
static void generateOnBoard(const NumEffectState &state, Action &action)
static void generate(Player p, const NumEffectState &state, Action &action)
Definition allMoves.h:34
static void generate(const NumEffectState &state, Action &action)
Player
Definition basic_type.h:8
@ BLACK
Definition basic_type.h:9
static void generateOnBoard(const NumEffectState &state, MoveVector &out)
Definition allMoves.h:56
static void generate(Player p, const NumEffectState &state, MoveVector &)
Definition allMoves.cc:15
static void generate(const NumEffectState &state, MoveVector &out)
Definition allMoves.h:49
指手を MoveVector に保管
Definition move_action.h:16