My Project
open.h
Go to the documentation of this file.
1 #ifndef OSL_GENERATE_OPEN_MOVES_H
2 #define OSL_GENERATE_OPEN_MOVES_H
5 #include "osl/numEffectState.h"
6 
7 namespace osl
8 {
9  namespace move_generator
10  {
16  template<class Action>
17  class Open
18  {
19  public:
20  template<Player P>
21  static void generate(const NumEffectState& state,Piece p,Action& action,Square to,Direction dir);
22 
23  };
24 
25  struct GenerateOpen
26  {
27  template<class Action>
28  static void
29  generate(Player pl,const NumEffectState& state,Piece p,
30  Action& action,Square to,Direction dir)
31  {
32  if (pl == BLACK)
33  Open<Action>::template generate<BLACK>(state, p, action, to, dir);
34  else
35  Open<Action>::template generate<WHITE>(state, p, action, to, dir);
36  }
37  };
38 
39  } // namespace move_generator
40 } // namespace osl
41 #endif /* OSL_GENERATE_OPEN_MOVES_H */
42 // ;;; Local Variables:
43 // ;;; mode:c++
44 // ;;; c-basic-offset:2
45 // ;;; End:
利きを持つ局面
長い利きを止めている駒を動かして, 利きを伸ばす.
Definition: open.h:18
static void generate(const NumEffectState &state, Piece p, Action &action, Square to, Direction dir)
Direction
Definition: basic_type.h:310
Player
Definition: basic_type.h:8
@ BLACK
Definition: basic_type.h:9
static void generate(Player pl, const NumEffectState &state, Piece p, Action &action, Square to, Direction dir)
Definition: open.h:29