説明を見る。00001 #ifndef OSL_GENERATE_OPEN_MOVES_H
00002 #define OSL_GENERATE_OPEN_MOVES_H
00003 #include "osl/move_generator/pieceOnBoard.h"
00004 #include "osl/move_generator/move_action.h"
00005 #include "osl/numEffectState.h"
00006
00007 namespace osl
00008 {
00009 namespace move_generator
00010 {
00016 template<class Action>
00017 class Open
00018 {
00019 public:
00020 template<Player P>
00021 static void generate(const NumEffectState& state,Piece p,Action& action,Square to,Direction dir);
00022
00023 };
00024
00025 struct GenerateOpen
00026 {
00027 template<class Action>
00028 static void
00029 generate(Player pl,const NumEffectState& state,Piece p,
00030 Action& action,Square to,Direction dir)
00031 {
00032 if (pl == BLACK)
00033 Open<Action>::template generate<BLACK>(state, p, action, to, dir);
00034 else
00035 Open<Action>::template generate<WHITE>(state, p, action, to, dir);
00036 }
00037 };
00038
00039 }
00040 }
00041 #endif
00042
00043
00044
00045